Commit e58d467f by 前端

Merge branch 'wangzh_dev_v4.19' into 'master'

Wangzh dev v4.19

See merge request !1
2 parents 90dd5368 90d8aefb
{
"name": "purchase",
"name": "inventory",
"version": "1.0.0",
"description": "A Vue.js project",
"private": true,
......
......@@ -149,7 +149,7 @@ const stockAllocateDetailPage = (params) => {
//导出
const exportExcel = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.life.GoodsWarehousingInfo.exportExcel`
params.routerMethod = `dj.api.goodsWarehousing.exportExcel`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
......@@ -194,7 +194,7 @@ const exportCheckExcel = (params) => {
//导出
const exportaAllocateExcel = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.api.stock.allocate.export.async`
params.routerMethod = `dj.smartcarlife.api.stock.allocate.export`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
......
......@@ -16,8 +16,8 @@ export const fetchConfig = function (isEnv = true) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
let params = { moduleName: 'inventory', mockUrl: 'https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/inventory/config', env: 'test', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
let params = { moduleName: 'inventory', mockUrl: 'https://oss-config.glsx.com.cn/mock/643e06c7ea3da3a974f54357/purchase/config',httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
return utils.getConfig(params)
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res)
......
......@@ -11,7 +11,7 @@ let router = null
let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) {
export async function bootstrap({ history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret, sign_common, request_common } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
......@@ -22,10 +22,10 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
}
export async function mount(props) {
const insts = render(props.routerBase, routes)
......
<template>
<div class="addWrap">
<div class="d2-container-content" style="padding: 10px 20px">
<el-form :inline="true" :model="editAllocationForm" ref="editAllocationFormRef" :rules="formRules" class="demo-form-inline">
<div class="d2-container-content gl-form-min" style="padding: 10px 20px">
<el-form :inline="true" size="small" :model="editAllocationForm" ref="editAllocationFormRef" :rules="formRules" class="demo-form-inline">
<el-form-item label="调出门店:" prop="callOutYqMerchantId">
<el-select v-model="editAllocationForm.callOutYqMerchantId" style="width: 300px">
<el-option v-for="item in callOutYqMerchantList" :key="item.merchantNo" :label="item.merchantName" :value="item.merchantNo" />
......@@ -17,14 +17,18 @@
</div>
<div class="d2-container-content">
<div style="padding: 15px 0">
<div>
<el-input v-model="searchForm.searchName" style="width: 200px" placeholder="请输入商品名称/系列" maxlength="20" clearable />
<el-button @click="handleSearch" size="small" type="primary" style="marginleft: 15px">查询</el-button>
<div class="gl-form-min">
<el-form :inline="true" size="small" :model="editAllocationForm">
<el-form-item label="">
<el-input v-model="searchForm.searchName" style="width: 200px" placeholder="请输入商品名称/系列" maxlength="20" clearable />
</el-form-item>
<el-button @click="handleSearch" size="small" type="primary" style="marginleft: 15px">查询</el-button>
</el-form>
</div>
</div>
<GLTable ref="allocationTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn">
<GLTable ref="allocationTable" :getListApi="getListApi" :pageConf="pageConf" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="allocation(scope.scope)" :disabled="setDisabled(scope.scope)">盘点</el-button>
<el-button type="text" @click="allocation(scope.scope)" :disabled="setDisabled(scope.scope)">选择</el-button>
</div>
</GLTable>
</div>
......@@ -72,6 +76,7 @@ export default {
}
],
getListApi: this.$apis.stockManage.stockRemainPage,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
......@@ -79,18 +84,15 @@ export default {
tableColumns: [
{
label: '商品名称',
prop: 'goodsName',
width: '160px'
prop: 'goodsName'
},
{
label: '系列',
prop: 'sourceMaterialName',
width: '250px'
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName',
width: '250px'
prop: 'goodsTypeName'
},
{
label: '库存',
......@@ -101,8 +103,7 @@ export default {
},
{
label: '所属门店',
prop: 'yqMerchantName',
width: '200px'
prop: 'yqMerchantName'
}
]
},
......@@ -113,18 +114,15 @@ export default {
tableColumns: [
{
label: '商品名称',
prop: 'goodsName',
width: '160px'
prop: 'goodsName'
},
{
label: '系列',
prop: 'sourceMaterialName',
width: '250px'
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName',
width: '250px'
prop: 'goodsTypeName'
},
{
label: '库存',
......@@ -142,7 +140,6 @@ export default {
}
]
},
editData: {
// thumbUrlList: [],
......@@ -186,18 +183,22 @@ export default {
}
}
},
created() {
if (window.__POWERED_BY_QIANKUN__) {
this.callOutYqMerchantList = [{ merchantNo: this.$globalState.session.merchantId + '', merchantName: this.$globalState.session.merchantName }]
}
},
mounted() {
// this.editAllocationForm.callOutYqMerchantId =
// this.callOutYqMerchantList[0].merchantNo
this.editAllocationForm.callOutYqMerchantId = this.callOutYqMerchantList[0].merchantNo
//调入门店
this.$apis.stockManage.yqRelatedList({ includeSelf: false }).then((res) => {
this.$apis.stockManage.yqRelatedList({ includeSelf: false }).then(res => {
this.callInYqMerchantList = res
})
},
methods: {
beforeSearchFn() {
return new Promise((resolve) => {
return new Promise(resolve => {
this.searchFormSearch = this.$common.utils.deepClone(this.searchForm)
resolve()
})
......@@ -214,7 +215,7 @@ export default {
//设置禁选
setDisabled(row) {
const index = this.chooseDataList.findIndex((item) => item.id == row.id)
const index = this.chooseDataList.findIndex(item => item.id == row.id)
if (index == -1) {
return false
} else {
......@@ -236,10 +237,13 @@ export default {
},
handleAddConfirm(data) {
this.$refs.editAllocationFormRef.validate((valid) => {
this.$refs.editAllocationFormRef.validate(valid => {
if (valid) {
if (this.chooseDataList.length == 0) {
this.notice.warningTips("请选择调拨商品")
this.$notify({
type: 'warning',
title: '请选择调拨商品'
})
return
}
var params = {}
......@@ -251,22 +255,21 @@ export default {
...params,
...this.editAllocationForm
}
this.$confirm(
"调拨单保存后,系统自动按照调拨数量对调出和调入门店进行库存更新;是否确定保存?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}
)
this.$confirm('调拨单保存后,系统自动按照调拨数量对调出和调入门店进行库存更新;是否确定保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.stockManage.saveStockAllocate(params).then((res) => {
this.notice.okTips()
this.$apis.stockManage.saveStockAllocate(params).then(res => {
this.$notify({
type: 'success',
title: res.message || '操作成功'
})
this.handleAddClose()
})
})
.catch((err) => {
.catch(err => {
console.log(err)
})
}
......@@ -274,8 +277,7 @@ export default {
},
handleAddClose(isRefresh = false) {
// this.close({ tagName: "/addAllocation" })
// this.$router.push({ name: "allocationList" })
this.$router.go(-1)
}
}
}
......
......@@ -4,6 +4,7 @@
:visible.sync="allocationDetailVisible"
class="inventoryDetailDailog"
mode="big"
okText="关闭"
@onCancel="handleClose"
@onOk="handleClose">
<div>
......@@ -16,6 +17,9 @@
</GLTable>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleClose">关闭</el-button>
</span>
</GLDialog>
</template>
......
<!-- 盘点 -->
<template>
<GLDialog title="调拨" mode="small" :visible.sync="allocationNumVisible" class="allocationNumDailog" okText="确定" @onCancel="handleClose" @onOk="handleAddConfirm">
<el-form ref="allocationNumForm" :model="infoForm" :rules="formRules" label-width="120px">
<GLDialog title="调拨" :visible.sync="allocationNumVisible" class="allocationNumDailog" okText="确定" @onCancel="handleClose" @onOk="handleAddConfirm">
<div class="gl-form-page gl-form-min">
<el-form ref="allocationNumForm" size="small" :model="infoForm" :rules="formRules" label-width="154px">
<el-form-item label="调拨数量:" prop="allocationNum">
<el-input placeholder="请输入调拨数量" v-model="infoForm.allocationNum" style="width: 250px" clearable @input="handleUpgradeNum"></el-input>
<el-input placeholder="请输入调拨数量" v-model="infoForm.allocationNum" clearable @input="handleUpgradeNum"></el-input>
</el-form-item>
</el-form>
</div>
</GLDialog>
</template>
......
......@@ -4,7 +4,9 @@
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<el-button type="primary" size="small" @click="handleAdd">创建调拨</el-button>
<GLButton type="primary" size="small" @click="handleAdd" fn="创建调拨">创建调拨</GLButton>
<!-- <el-button type="primary" size="small" @click="handleAdd">创建调拨</el-button> -->
<!-- <h2>调拨列表</h2> -->
<el-button type="primary" size="small" @click="exportExcel">导出</el-button>
</div>
......@@ -109,7 +111,9 @@ export default {
},
{
label: '备注',
prop: 'remark'
prop: 'remark',
width: 200,
line: 1
}
]
},
......@@ -149,10 +153,9 @@ export default {
},
// 查看详情
handleDetail(row) {
this.allocationInfo = row
this.allocationDetailVisible = true
console.log(this.allocationDetailVisible)
console.log(this.allocationDetailVisible)
},
handleAdd() {
this.$router.push({ path: '/allocation/add' })
......@@ -187,10 +190,8 @@ export default {
this.$refs.allocationRef.data.length ? (this.$refs.allocationRef.tableHeightValues = '') : this.$refs.allocationRef.setTableHeightFun()
},
exportExcel() {
this.exportLoading = true
var params = this.getParams()
this.$apis.stockManage.exportaAllocateExcel(params).then(res => {
this.exportLoading = false
window.location.href = res
})
},
......
......@@ -3,13 +3,18 @@
<div class="addWrap">
<div class="d2-container-content">
<div style="padding: 15px 0">
<div>
<el-input v-model="searchForm.searchName" style="width: 200px" placeholder="请输入商品名称/系列" maxlength="20" clearable />
<el-button @click="handleSearch" size="small" type="primary" style="marginleft: 15px">查询</el-button>
<div class="gl-form-min">
<el-form ref="ruleForm" :model="searchForm" size="small" inline="true">
<el-form-item label="">
<el-input v-model="searchForm.searchName" style="width: 200px" placeholder="请输入商品名称/系列" maxlength="20" clearable />
</el-form-item>
<el-button @click="handleSearch" size="small" type="primary">查询</el-button>
</el-form>
</div>
</div>
<p class="title">盘存</p>
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn">
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf">
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="inventory(scope.scope)" :disabled="setDisabled(scope.scope)">盘点</el-button>
</div>
......@@ -33,8 +38,7 @@
</div>
<glsx-form ref="addInventoryForm" :origin-data="editData" :form-list="editForm" form-ref="inveFormRef" @handleAddConfirm="handleAddConfirm" @handleClose="handleAddClose"></glsx-form>
<!-- 盘点 -->
<inventory-num-dialog :inventory-num-visible="inventoryNumVisible" :record-info="recordInfo"
v-if="inventoryNumVisible" @dialogClose="dialogClose" />
<inventory-num-dialog :inventory-num-visible="inventoryNumVisible" :record-info="recordInfo" v-if="inventoryNumVisible" @dialogClose="dialogClose" />
</div>
</template>
......@@ -55,6 +59,7 @@ export default {
searchFormSearch: {},
searchSelectObj: {},
getListApi: this.$apis.stockManage.stockRemainPage,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
......@@ -62,18 +67,15 @@ export default {
tableColumns: [
{
label: '商品名称',
prop: 'goodsName',
width: '160px'
prop: 'goodsName'
},
{
label: '系列',
prop: 'sourceMaterialName',
width: '250px'
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName',
width: '250px'
prop: 'goodsTypeName'
},
{
label: '库存',
......@@ -84,8 +86,7 @@ export default {
},
{
label: '所属门店',
prop: 'yqMerchantName',
width: '200px'
prop: 'yqMerchantName'
}
]
},
......@@ -213,7 +214,6 @@ export default {
dialogClose(chooseData) {
this.inventoryNumVisible = !this.inventoryNumVisible
console.log(chooseData)
if (chooseData) {
this.chooseDataList.push(chooseData)
}
......@@ -226,7 +226,10 @@ export default {
handleAddConfirm(data) {
if (this.chooseDataList.length == 0) {
this.notice.warningTips('请选择盘存商品')
this.$notify({
type: 'warning',
title: '请选择盘存商品'
})
return
}
var params = {}
......@@ -245,7 +248,10 @@ export default {
})
.then(() => {
this.$apis.stockManage.saveStockCheck(params).then(res => {
this.notice.okTips()
this.$notify({
type: 'success',
title: res.message || '操作成功'
})
this.handleAddClose()
})
})
......@@ -255,18 +261,16 @@ export default {
},
handleAddClose(isRefresh = false) {
this.close({ tagName: '/addInventory' })
this.$router.push({ name: 'inventoryList' })
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.d2-container-content{
.d2-container-content {
background: #fff;
padding: 20px;
margin-bottom: 20px;
padding: 20px;
margin-bottom: 20px;
}
.count-txt {
font-weight: 700;
......@@ -277,7 +281,7 @@ export default {
font-weight: 600;
font-size: 16px;
color: #333333;
padding:17px 0;
padding: 17px 0;
}
.leftSpan {
display: inline-block;
......
......@@ -4,7 +4,9 @@
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<el-button type="primary" size="small" @click="handleAdd">创建盘点</el-button>
<GLButton type="primary" size="small" @click="handleAdd" fn="创建盘点">创建盘点</GLButton>
<!-- <el-button type="primary" size="small" @click="handleAdd">创建盘点</el-button> -->
<!-- <h2>盘点列表</h2> -->
<el-button type="primary" size="small" @click="exportExcel">导出</el-button>
</div>
......@@ -85,20 +87,17 @@ export default {
{
label: '盘点单号',
prop: 'checkCode',
width: 200
},
{
label: '盘点时间',
prop: 'checkTime',
width: 150,
formatter: cellValue => {
return dayjs(cellValue.checkTime).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '盘点人',
prop: 'operator',
width: 150
prop: 'operator'
},
{
label: '盘点门店',
......@@ -106,12 +105,13 @@ export default {
},
{
label: '备注',
prop: 'remark'
prop: 'remark',
width: 200,
line: 1
},
{
label: '凭证',
prop: 'voucherPic',
width: 100,
addHtml: 'img'
}
]
......@@ -188,11 +188,9 @@ export default {
this.$refs.checkRef.data.length ? (this.$refs.checkRef.tableHeightValues = '') : this.$refs.checkRef.setTableHeightFun()
},
exportExcel() {
this.exportLoading = true
var params = this.getParams()
this.$apis.stockManage.exportCheckExcel(params).then(res => {
// this.exportLoading = false
// window.location.href = res
window.location.href = res
})
},
handleSearch() {
......
<!-- 盘点详情弹窗弹窗 -->
<template>
<GLDialog bigTitle="详细信息"
:visible.sync="inventoryDetailVisible"
class="inventoryDetailDailog"
mode="big"
@onCancel="handleClose"
@onOk="handleClose">
<GLDialog bigTitle="详细信息" :visible.sync="inventoryDetailVisible" :before-close="handleClose" class="inventoryDetailDailog" mode="big" okText="关闭" @onCancel="handleClose" @onOk="handleClose">
<div>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<div class="header" slot="header" style="padding: 10px 20px">
<!-- <GLCombiForm ref="showSearch"
class="show-search"
:search-form="searchForm"
......@@ -17,26 +10,21 @@
:form-data="showFormData"></GLCombiForm> -->
</div>
<div class="d2-container-content">
<GLTable ref="recordTable"
:getListApi="getListApi"
:searchForm="searchFormSearch"
:tableParams="tableParams"
:beforeSearchFn="beforeSearchFn">
<template slot="profitAndLoss"
slot-scope="scope">
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn">
<template slot="profitAndLoss" slot-scope="scope">
<span v-if="scope.scope.profitAndLoss || scope.scope.profitAndLoss == 0">
<span v-if="parseFloat(scope.scope.profitAndLoss) > 0"
style="color:blue">{{ '+' + parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0"
style="color:red">{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span
v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-if="parseFloat(scope.scope.profitAndLoss) > 0" style="color: blue">{{ '+' + parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" style="color: red">{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
</span>
<span v-else>-</span>
</template>
</GLTable>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleClose">关闭</el-button>
</span>
</GLDialog>
</template>
......
<!-- 盘点 -->
<template>
<GLDialog title="盘点"
:visible.sync="inventoryNumVisible"
class="inventoryNumDailog"
mode="small"
@onCancel="handleClose"
@onOk="handleAddConfirm">
<el-form ref="inventoryNumForm"
:model="infoForm"
:rules="formRules"
label-width="120px">
<el-form-item label="盘点数量:"
prop="inventoryNum">
<el-input placeholder="请输入盘点数量"
v-model="infoForm.inventoryNum"
style="width:250px"
clearable
@input="handleUpgradeNum">
</el-input>
</el-form-item>
</el-form>
<GLDialog title="盘点" :visible.sync="inventoryNumVisible" class="inventoryNumDailog" @onCancel="handleClose" @onOk="handleAddConfirm">
<div class="gl-form-page gl-form-min">
<el-form ref="inventoryNumForm" :model="infoForm" :rules="formRules" label-width="154px" size="small">
<el-form-item label="盘点数量:" prop="inventoryNum">
<el-input placeholder="请输入盘点数量" v-model="infoForm.inventoryNum" clearable @input="handleUpgradeNum"></el-input>
</el-form-item>
</el-form>
</div>
</GLDialog>
</template>
......@@ -34,13 +22,11 @@ export default {
inventoryNum: ''
},
oldVal: {
inventoryNum: '',
inventoryNum: ''
},
formRules: {
inventoryNum: [
{ required: true, message: '请输入盘点数量', trigger: 'change' }
]
inventoryNum: [{ required: true, message: '请输入盘点数量', trigger: 'change' }]
},
selectLoading: false,
// 基本数据
......@@ -57,27 +43,20 @@ export default {
},
recordInfo: {
type: Object,
default: () => { }
},
default: () => {}
}
},
watch: {
},
watch: {},
created() {
},
created() {},
components: {},
computed: {
computed: {},
},
mounted() {
},
mounted() {},
methods: {
handleUpgradeNum(newVal) {
this.infoForm.inventoryNum = limitPrice(newVal, this.oldVal.inventoryNum, 8, 2)
this.oldVal.inventoryNum = this.infoForm.inventoryNum
......
......@@ -4,7 +4,7 @@
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<h2>库存预警列表</h2>
<h2>预警列表</h2>
<div>
<el-button type="primary" size="small" @click="gotoReplenishment">去补货</el-button>
<el-button type="primary" size="small" @click="exportExcel">导出</el-button>
......@@ -12,15 +12,13 @@
</div>
<!-- 表格区域 开始 -->
<GLTable ref="earlyWarningRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
</GLTable>
<GLTable ref="earlyWarningRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js'
export default {
......@@ -181,17 +179,14 @@ export default {
this.$refs.earlyWarningRef.data.length ? (this.$refs.earlyWarningRef.tableHeightValues = '') : this.$refs.earlyWarningRef.setTableHeightFun()
},
exportExcel() {
this.exportLoading = true
var params = this.getParams()
var params = this.searchForm
this.$apis.stockManage.exportaInventExcel(params).then(res => {
this.exportLoading = false
window.location.href = res
})
},
//去补货
//去补货
gotoReplenishment() {
// this.close({ tagName: '/orderList' })
this.$router.push({ name: 'purchasingMall' })
this.$history.push(`/purchase/purchaseOrder/add`)
},
handleSearch() {
this.$refs.earlyWarningRef.refreshTable()
......
......@@ -103,7 +103,7 @@ export default {
tableOption: false,
tableColumns: [
{
label: '入库时间',
label: '出库时间',
prop: 'reduceDate',
formatter: cellValue => {
return dayjs(cellValue.reduceDate).format('YYYY-MM-DD HH:mm:ss')
......@@ -113,7 +113,8 @@ export default {
{
label: '商品名称',
prop: 'upgradeGoodsName',
width: 160
width: 180,
line: 1
},
{
label: '系列',
......@@ -198,8 +199,8 @@ export default {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.reduceDate) {
params.reduceStartDateStr = new Date(this.searchForm.reduceDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.reduceEndDateStr = new Date(this.searchForm.reduceDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
params.reduceStartDateStr = dayjs(this.searchForm.reduceDate[0]).format('YYYY-MM-DD HH:mm:ss')
params.reduceEndDateStr = dayjs(this.searchForm.reduceDate[0]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params.reduceDate
return params
......@@ -240,11 +241,9 @@ export default {
this.$refs.outboundRef.data.length ? (this.$refs.outboundRef.tableHeightValues = '') : this.$refs.outboundRef.setTableHeightFun()
},
exportExcel() {
this.exportLoading = true
var params = this.getParams()
this.$apis.stockManage.exportReduceExcel(params).then(res => {
// this.exportLoading = false
// window.location.href = res
window.location.href = res
})
},
handleSearch() {
......@@ -253,7 +252,7 @@ export default {
handleReset() {
this.searchForm = {
reduceDate: '',
reduceDate: '',
eventType: '',
upgradeGoodsName: '',
yqMerchantId: '',
......
......@@ -89,7 +89,8 @@ export default {
{
label: '商品名称',
prop: 'upgradeGoodsName',
width: 160
width: 180,
line: 1
},
{
label: '系列',
......@@ -154,6 +155,7 @@ export default {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.$common.utils.deepClone(this.searchForm)
this.tableSearchForm.dataMonth = dayjs(new Date()).format('YYYY-MM')
resolve()
})
},
......@@ -191,14 +193,12 @@ export default {
//接收到的数据为空
this.$refs.stockRef.data.length ? (this.$refs.stockRef.tableHeightValues = '') : this.$refs.stockRef.setTableHeightFun()
},
exportExcel() {
exportExcel() {
this.exportLoading = true
var params = this.getParams()
var params = this.searchForm
this.$apis.stockManage.exportMerchantExcel(params).then(res => {
// window.location.href = res
window.location.href = res
})
},
handleSearch() {
this.$refs.stockRef.refreshTable()
......@@ -213,7 +213,7 @@ export default {
}
this.handleSearch()
},
dialogClose() {
dialogClose() {
this.stockMonthVisible = !this.stockMonthVisible
}
}
......
<template>
<GLDialog v-if="stockMonthVisible" :destroy-on-close="true" bigTitle="月度库存结算单" mode="big" :visible.sync="stockMonthVisible" :close-on-click-modal="false" @onOk="handleClose" @onCancel="handleClose">
<GLDialog class="stock-dialog" v-if="stockMonthVisible" :destroy-on-close="true" bigTitle="月度库存结算单" mode="big" okText="关闭" :visible.sync="stockMonthVisible" :close-on-click-modal="false" @onOk="handleClose" @onCancel="handleClose">
<div class="detail-content" v-if="stockMonthVisible">
<el-form :inline="true" :model="searchForm">
<el-form :inline="true" :model="searchForm" size="small">
<el-form-item label="年度:">
<el-date-picker v-model="searchForm.year" type="year" placeholder="选择年" value-format="yyyy" format="yyyy" :clearable="false" :picker-options="pickerOption" @change="chooseYear"></el-date-picker>
</el-form-item>
......@@ -14,6 +14,9 @@
说明:月平均加权单价=上月结存库存金额+本月采购金额/上月结存库存数量+本月采购数量
</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleClose">关闭</el-button>
</span>
</GLDialog>
</template>
......@@ -154,6 +157,12 @@ export default {
</script>
<style lang="scss" scoped>
.stock-dialog {
/deep/.el-dialog__body {
min-height: 167px;
max-height: 616px;
}
}
.btn-tips {
display: inline-block;
font-size: 12px;
......
......@@ -113,11 +113,14 @@ export default {
{
label: '商品名称',
prop: 'upgradeGoodsName',
width: 160
width: 180,
line: 1
},
{
label: '系列',
prop: 'goodsSeries'
prop: 'goodsSeries',
width: 150,
line: 1
},
{
label: '所属分类',
......@@ -144,7 +147,7 @@ export default {
{
label: '入库类型',
prop: 'increaseStockType',
width: '100px',
width: 100,
formatter: cellValue => {
return this.baseData.storageTypeList.find(item => item.confId === cellValue.increaseStockType?.toString())?.confLabel
}
......@@ -282,13 +285,10 @@ export default {
this.$router.push('/purchaseOrder/add')
},
exportExcel() {
this.exportLoading = true
var params = this.getParams()
this.$apis.stockManage.exportExcel(params).then(res => {
// window.location.href = res
window.location.href = res
})
},
handleSearch() {
this.$refs.warehousingRef.refreshTable()
......
......@@ -9,7 +9,7 @@ const cdn = {
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, 'https://webapi.amap.com/loader.js']
}
module.exports = {
outputDir: `../dist/${packageName}`,
outputDir: `dist`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!