Commit 08e7eb19 by 前端

Merge branch 'SAAS+V5.7.4' into 'SAAS+V5.8.0'

上线合并

See merge request !25
2 parents 67be202f b7db1e39
......@@ -17,7 +17,7 @@
},
"@amap/amap-jsapi-loader": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
"resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
},
"@ampproject/remapping": {
......@@ -1895,6 +1895,51 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
......@@ -1903,6 +1948,28 @@
"requires": {
"minipass": "^3.1.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
......@@ -3323,7 +3390,7 @@
},
"camelcase": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
"resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-1.2.1.tgz",
"integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g=="
},
"camelcase-keys": {
......@@ -6565,9 +6632,9 @@
}
},
"glsx-components": {
"version": "1.5.4",
"resolved": "https://registry.npmmirror.com/glsx-components/-/glsx-components-1.5.4.tgz",
"integrity": "sha512-TemXhzs6giPF7idPHNhrpeMNvP4O6hbm6q/aKPNJSldZB7o+MbmPxeYXKZydvvz6V53tk+KBLbgVhcSv1F8FIA==",
"version": "1.5.7",
"resolved": "https://registry.npmmirror.com/glsx-components/-/glsx-components-1.5.7.tgz",
"integrity": "sha512-WEWt1Ev7uf8VgILrEr15ZHxOreqWEVEY2WRP5EmZKzYKTVF/7dQU/oI84+Xo4vSmlz7ltblaATyrwm1U1LDnHg==",
"requires": {
"@amap/amap-jsapi-loader": "^1.0.1",
"core-js": "^3.6.5",
......@@ -6580,7 +6647,7 @@
"dependencies": {
"glsx-common": {
"version": "1.4.9",
"resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz",
"resolved": "https://registry.npmmirror.com/glsx-common/-/glsx-common-1.4.9.tgz",
"integrity": "sha512-RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg==",
"requires": {
"axios": "^0.21.3",
......@@ -12253,7 +12320,7 @@
},
"sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.10.2.tgz",
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"source-list-map": {
......@@ -13336,7 +13403,7 @@
},
"uppercamelcase": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/uppercamelcase/-/uppercamelcase-1.1.0.tgz",
"resolved": "https://registry.npmmirror.com/uppercamelcase/-/uppercamelcase-1.1.0.tgz",
"integrity": "sha512-C7YEMvhgrvTEKEEVqA7LXNID/1TvvIwYZqNIKLquS6y/MGSkRQAav9LnTTILlC1RqUM8eTVBOe1U/fnB652PRA==",
"requires": {
"camelcase": "^1.2.1"
......@@ -13527,7 +13594,7 @@
},
"vue-amap": {
"version": "0.5.10",
"resolved": "https://registry.npmjs.org/vue-amap/-/vue-amap-0.5.10.tgz",
"resolved": "https://registry.npmmirror.com/vue-amap/-/vue-amap-0.5.10.tgz",
"integrity": "sha512-9ViNCev1vx32+zZ5RvF/TmUZNbwL9QrdA2/OnD2GlXMfQBkJy7D08Vb7379t6guqnopDPtWJ8K6gg72h9+4GUg==",
"requires": {
"uppercamelcase": "^1.1.0"
......@@ -13613,75 +13680,6 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
......@@ -13743,7 +13741,7 @@
},
"vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
"resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-2.24.3.tgz",
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
"requires": {
"sortablejs": "1.10.2"
......
......@@ -15,7 +15,7 @@
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^2.10.1",
"glsx-components": "^1.5.4",
"glsx-components": "^1.5.7",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
......
......@@ -16,6 +16,17 @@ const getyqMerchantList = params => {
sign: true
})
}
// 调出仓库
const getyqMerchantPageList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.api.yqMerchant.pageList`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 根据仓库获取门店列表
const getServicemerchantrefList = params => {
......@@ -471,7 +482,79 @@ const refundDetail = params => {
sign: true
})
}
// 调拨发货列表数据
const getTransferShipmentList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.api.stock.allocate.delivery.page`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 调拨发货 批量发货
const batchDelicery = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smartcarlife.allocate.delivery.batch`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 调拨发货驳回
const deliveryReject = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.api.stock.allocate.delivery.reject`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取查看调拨详情商品信息
const getTransferGoodsInfo = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.api.stock.allocate.detail.page`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取查看调拨详情审批记录信息
const getTransferAuitInfo = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.api.stock.allocate.info`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getTransferGoodsInfo,
getTransferAuitInfo,
getTransferShipmentList,
deliveryReject,
batchDelicery,
inventoryWarningList,
exportaInventExcel,
exportaAllocateExcel,
......@@ -494,6 +577,7 @@ export default {
getMerchantGoodsStockReduceRecord,
getReportByGoods,
getyqMerchantList,
getyqMerchantPageList,
getGoodsWarehousingCount,
getGoodsWarehousingList,
getMerchantGoodsStockMonthCount,
......
......@@ -5,24 +5,24 @@
<el-form :inline="true" size="small" :model="editAllocationForm" ref="editAllocationFormRef" :rules="formRules" class="demo-form-inline">
<el-form-item>调出方:</el-form-item>
<el-form-item label="调出仓库:" prop="callOutYqMerchantId">
<el-select v-model="editAllocationForm.callOutYqMerchantId" style="width: 300px">
<el-select v-model="editAllocationForm.callOutYqMerchantId" style="width: 300px" filterable>
<el-option v-for="item in callOutYqMerchantList" :key="item.merchantNo" :label="item.merchantName" :value="item.merchantNo" />
</el-select>
</el-form-item>
<el-form-item label="调出门店:" prop="callOutMerchantId">
<el-select v-model="editAllocationForm.callOutMerchantId" style="width: 300px">
<el-select v-model="editAllocationForm.callOutMerchantId" filterable style="width: 300px">
<el-option v-for="item in callOutMerchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId" />
</el-select>
</el-form-item>
<br />
<el-form-item>调入方:</el-form-item>
<el-form-item label="调入仓库:" prop="callInYqMerchantId">
<el-select v-model="editAllocationForm.callInYqMerchantId" @change="changeCallInYqMerchant(editAllocationForm.callInYqMerchantId)" style="width: 300px">
<el-select v-model="editAllocationForm.callInYqMerchantId" filterable @change="changeCallInYqMerchant(editAllocationForm.callInYqMerchantId)" style="width: 300px">
<el-option v-for="item in callInYqMerchantList" :key="item.merchantNo" :label="item.merchantName" :value="item.merchantNo" />
</el-select>
</el-form-item>
<el-form-item label="调入门店:" prop="callInMerchantId">
<el-select v-model="editAllocationForm.callInMerchantId" style="width: 300px">
<el-select v-model="editAllocationForm.callInMerchantId" filterable style="width: 300px">
<el-option v-for="item in callInMerchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId" />
</el-select>
</el-form-item>
......@@ -99,6 +99,7 @@ export default {
callInMerchantList: [],
// membraneTypeList: membraneTypeList,
searchForm: {
queryOtherMerchant: true,
upgradeGoodsNameOrSeries: '',
stockFlag: true
},
......@@ -145,13 +146,13 @@ export default {
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '库存',
prop: 'stock',
formatter: cellValue => {
return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}
},
// {
// label: '库存',
// prop: 'stock',
// formatter: cellValue => {
// return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
// }
// },
{
label: '所属仓库',
prop: 'yqMerchantName'
......@@ -194,13 +195,13 @@ export default {
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '库存',
prop: 'outStockQty',
formatter: cellValue => {
return cellValue.outStockQty || cellValue.outStockQty == 0 ? parseFloat(cellValue.outStockQty).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}
},
// {
// label: '库存',
// prop: 'outStockQty',
// formatter: cellValue => {
// return cellValue.outStockQty || cellValue.outStockQty == 0 ? parseFloat(cellValue.outStockQty).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
// }
// },
{
label: '调拨库存',
prop: 'allocateNumber ',
......@@ -412,19 +413,22 @@ export default {
// this.isDisabled = true
this.getDetail()
}
// 调出仓库
// 调入仓库
this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.callOutYqMerchantList = this.$common.utils.deepClone(res)
this.callInYqMerchantList = this.$common.utils.deepClone(res)
if (this.callOutYqMerchantList && this.callOutYqMerchantList.length == 1 && this.oprType == 'add') {
this.editAllocationForm.callOutYqMerchantId = this.callOutYqMerchantList[0].merchantNo
this.getServicemerchantrefList(this.editAllocationForm.callOutYqMerchantId, 'out')
}
if (this.callInYqMerchantList && this.callInYqMerchantList.length == 1 && this.oprType == 'add') {
this.editAllocationForm.callInYqMerchantId = this.callInYqMerchantList[0].merchantNo
this.getServicemerchantrefList(this.editAllocationForm.callInYqMerchantId, 'in')
}
})
//调出仓库
this.$apis.stockManage.getyqMerchantPageList({ currentPage: 1, pageSize: 10000 }).then(res => {
this.callOutYqMerchantList = this.$common.utils.deepClone(res.list)
if (this.callOutYqMerchantList && this.callOutYqMerchantList.length == 1 && this.oprType == 'add') {
this.editAllocationForm.callOutYqMerchantId = this.callOutYqMerchantList[0].merchantNo
this.getServicemerchantrefList(this.editAllocationForm.callOutYqMerchantId, 'out')
}
})
},
methods: {
......@@ -608,12 +612,12 @@ export default {
* 作废按钮(invalid) - 5:作废
**/
beforeConfirm(btnType = 'save') {
const p1 = new Promise((resolve) => {
const p1 = new Promise(resolve => {
this.$refs.editAllocationFormRef.validate(valid => {
resolve(valid)
})
})
const p2 = new Promise((resolve) => {
const p2 = new Promise(resolve => {
this.$refs.allocationFormRef.$refs.inveFormRefd2FormRuleForm.validate(valid => {
resolve(valid)
})
......@@ -621,10 +625,7 @@ export default {
Promise.all([p1, p2]).then(([valid1, valid2]) => {
if (valid1 && valid2) {
if (this.chooseDataList.length == 0) {
this.$notify({
type: 'warning',
title: '请选择调拨商品'
})
this.$message.error('请选择调拨商品')
return
}
const data = this.$refs.allocationFormRef.formData
......@@ -656,7 +657,7 @@ export default {
.then(res => {
this.$notify({
type: res.code == 0 ? 'success' : 'error',
title: res.code == 0 ? (tipTxtObj[btnType] || '操作成功') : res.message
title: res.code == 0 ? tipTxtObj[btnType] || '操作成功' : res.message
})
if (res.code == 0) {
if (btnType == 'save') {
......
......@@ -5,7 +5,7 @@
<div>
单据状态:
<span :class="billStatusName()" style="margin-right: 4px;" />
{{ baseData.billStatusObj[allocationInfo.billStatus]?.name || '-' }}
{{ (baseData.billStatusObj[allocationInfo.billStatus]||{}).name || '-' }}
</div>
<div class="receipt-box">
<div v-for="(item, index) in infoForm" :class="item.class" :key="index">
......
<!-- 盘点 -->
<template>
<GLDialog title="调拨" :visible.sync="allocationNumVisible" :before-close="e => handleClose(undefined, true)" class="allocationNumDailog" okText="确定" @onCancel="e => handleClose(e, true)" @onOk="handleAddConfirm">
<div class="gl-form-page gl-form-min">
......@@ -53,7 +53,7 @@ export default {
methods: {
handleUpgradeNum(newVal) {
this.infoForm.allocationNum = limitPrice(newVal, this.oldVal.allocationNum, 8, 2, 0, this.allocationInfo.stock)
this.infoForm.allocationNum = limitPrice(newVal, this.oldVal.allocationNum, 8, 2, 0, 999999)
this.oldVal.allocationNum = this.infoForm.allocationNum
},
......
<template>
<div class="purchase">
<div class="purchase ">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header">
......@@ -15,13 +15,13 @@
<GLTable ref="allocationRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="billStatus" slot-scope="scope">
<div>
<span :class="billStatusObj[scope.scope.billStatus]?.class || ''"></span>
<span :class="(billStatusObj[scope.scope.billStatus] || {}).class || ''"></span>
<span>{{ scope.scope.billStatusName }}</span>
</div>
</template>
<template slot="deliveryStatus" slot-scope="scope">
<div>
<span :class="deliveryStatusObj[scope.scope.deliveryStatus]?.class || ''"></span>
<span :class="(deliveryStatusObj[scope.scope.deliveryStatus] || {}).class || ''"></span>
<span>{{ scope.scope.deliveryStatusName }}</span>
</div>
</template>
......@@ -52,6 +52,7 @@ export default {
size: 'small',
url: url,
searchForm: {
queryCallInMerchant: true,
allocateTime: '',
allocateCode: '',
callOutYqMerchantId: '',
......@@ -297,7 +298,7 @@ export default {
console.log(row)
this.updateStatus(row, 1, '提交审核成功')
})
.catch(() => { })
.catch(() => {})
}
}
},
......@@ -332,7 +333,7 @@ export default {
console.log(row)
this.updateStatus(row, '-1', '作废成功')
})
.catch(() => { })
.catch(() => {})
}
}
}
......@@ -508,7 +509,8 @@ export default {
callOutMerchantId: '',
callInMerchantId: '',
billStatusList: '',
deliveryStatus: ''
deliveryStatus: '',
queryCallInMerchant: true
}
this.showFormData[this.findFormIdx('callOutMerchantId')].optionList = []
this.showFormData[this.findFormIdx('callInMerchantId')].optionList = []
......
<template>
<div class="appropriate">
<el-tabs v-model="activeName" type="card" @tab-click="handleTabChange">
<el-tab-pane label="我发起的调拨" name="alloctList"></el-tab-pane>
<el-tab-pane label="我收到的调拨" name="transferShipmentList"></el-tab-pane>
</el-tabs>
<component :is="activeName" :ref="activeName" />
</div>
</template>
<script>
import alloctList from '../allocation/index.vue'
import transferShipmentList from '../transferShipment/index.vue'
export default {
components: {
alloctList,
transferShipmentList
},
data() {
return {
activeName: 'alloctList'
}
},
methods: {
handleTabChange() {
this.$nextTick(() => {
this.$refs[this.activeName].handleSearch()
})
}
}
}
</script>
<style lang="scss" scoped>
.appropriate {
::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
border-bottom: 1px solid #5850ff !important;
}
::v-deep .el-tabs--card > .el-tabs__header .el-tabs__nav {
border: 1px solid transparent !important;
}
// ::v-deep .el-tabs__nav .el-tabs__item:nth-child(1) {
// border-right: 1px solid transparent !important;
// }
::v-deep .el-tabs__nav .el-tabs__item:nth-child(2) {
border-left: 1px solid transparent !important;
}
}
</style>
<template>
<div class="purchase">
<div class="container">
<GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<div>
合计:出库数量
......@@ -14,19 +9,11 @@
,出库金额
<span class="txt-blue">¥{{ totalObj.totalReduceStockMoney || '0' }}</span>
</div>
<el-button size="small"
@click="exportExcel">导出</el-button>
<el-button size="small" @click="exportExcel">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="outboundRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<GLTable ref="outboundRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<!-- <div class="table-btns"
slot="auth-button"
slot-scope="scope"
......@@ -37,10 +24,7 @@
</GLTable>
<!-- 表格区域 end -->
<!-- 关联技师 -->
<correlationDialog :visible.sync="corrVisible"
v-if="corrVisible"
:params-obj="recordInfo"
@dialogClose="closeCorrDialog" />
<correlationDialog :visible.sync="corrVisible" v-if="corrVisible" :params-obj="recordInfo" @dialogClose="closeCorrDialog" />
</div>
</div>
</template>
......@@ -195,9 +179,9 @@ export default {
tableColumns: [
{
label: '出库时间',
prop: 'reduceDate',
prop: 'createdDate',
formatter: cellValue => {
return dayjs(cellValue.reduceDate).format('YYYY-MM-DD HH:mm:ss')
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
},
width: 180
},
......@@ -297,6 +281,14 @@ export default {
formatter: cellValue => {
return cellValue.storeUsage || '-'
}
},
{
label: '操作时间',
prop: 'reduceDate',
formatter: cellValue => {
return dayjs(cellValue.reduceDate).format('YYYY-MM-DD HH:mm:ss')
},
width: 180
}
// {
// label: '操作人',
......
......@@ -5,7 +5,7 @@
<div>
单据状态:
<span :class="refundClassName()" />
{{ baseData.refundStatusList.find(item => item.confId == recordInfo.refundStatus)?.confLabel || '-' }}
{{ (baseData.refundStatusList.find(item => item.confId == recordInfo.refundStatus)||{}).confLabel || '-' }}
</div>
<div class="header" slot="header" style="padding: 10px 20px">
<!-- <GLCombiForm ref="showSearch"
......
......@@ -156,7 +156,8 @@ export default {
width: 150,
addHtml: 'refundStatus',
formatter: cellValue => {
return this.baseData.refundStatusList.find(item => item.confId === cellValue.refundStatus)?.confLabel || '-'
let item = this.baseData.refundStatusList.find(item => item.confId === cellValue.refundStatus)
return item ? item.confLabel : '-'
},
className: cellValue => {
return {
......@@ -216,7 +217,7 @@ export default {
console.log(row)
this.updateStatus(row, 2, '提交审核成功')
})
.catch(() => { })
.catch(() => {})
}
}
},
......@@ -255,7 +256,7 @@ export default {
console.log(row)
this.updateStatus(row, 5, '作废成功')
})
.catch(() => { })
.catch(() => {})
}
}
}
......@@ -452,6 +453,7 @@ export default {
}
}
}
@mixin spotBase {
width: 8px;
height: 8px;
......@@ -459,6 +461,7 @@ export default {
margin-right: 5px;
display: inline-block;
}
.ashSpot {
@include spotBase();
background: #c6c8cc;
......
<template>
<div class="purchase">
<div class="container">
<GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset">
<template #queryDateHtml>
<el-date-picker v-model="searchForm.queryDate" type="date" placeholder="请选择" :picker-options="stockQueryDatePickerOptions"></el-date-picker>
</template>
</GLCombiForm>
<div class="table-header">
<div>
合计:当前库存
<span class="txt-blue">{{ totalInventory || '0' }}</span>
</div>
<div>
<GLButton type="primary"
plain
size="small"
@click="handleStatementOfAccount"
fn="库存对账单">库存对账单</GLButton>
<el-button size="small"
@click="exportExcel">导出</el-button>
<GLButton type="primary" plain size="small" @click="handleStatementOfAccount" fn="库存对账单">库存对账单</GLButton>
<el-button size="small" @click="exportExcel">导出</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="stockRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<el-button type="text"
@click="handleInventoryDetails(scope.scope)">库存明细</el-button>
<el-button type="text"
@click="handleDetail(scope.scope)">统计</el-button>
<GLTable ref="stockRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleInventoryDetails(scope.scope)">库存明细</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">统计</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- 查看 -->
<stock-month-dialog :stock-month-visible="stockMonthVisible"
:stockInfo="stockInfo"
v-if="stockMonthVisible"
@dialogClose="dialogClose" />
<stockDetailDialog :visible.sync="stockDetailDialogVisible"
:recordInfo="stockInfo"
v-if="stockDetailDialogVisible" />
<stock-month-dialog :stock-month-visible="stockMonthVisible" :stockInfo="stockInfo" v-if="stockMonthVisible" @dialogClose="dialogClose" />
<stockDetailDialog :visible.sync="stockDetailDialogVisible" :recordInfo="stockInfo" v-if="stockDetailDialogVisible" />
<!-- 库存对账单 -->
<statementOfAccountDialog :visible.sync="statementOfAccountDialogVisible"
v-if="statementOfAccountDialogVisible"
:yqMerchantList="baseData.yqMerchantList"
@handleRelateProConfirm="handleRelateProConfirm">
</statementOfAccountDialog>
<statementOfAccountDialog :visible.sync="statementOfAccountDialogVisible" v-if="statementOfAccountDialogVisible" :yqMerchantList="baseData.yqMerchantList" @handleRelateProConfirm="handleRelateProConfirm"></statementOfAccountDialog>
</div>
</template>
......@@ -85,7 +59,8 @@ export default {
yqMerchantId: '',
goodsType: '',
goodsSeries: '',
productCode: ''
productCode: '',
queryDate: ''
},
tableSearchForm: {},
stockInfo: {},
......@@ -130,6 +105,11 @@ export default {
optionId: 'categoryType',
optionLabel: 'categoryName',
optionsName: 'productTypeList'
},
{
label: '选择日期',
name: 'queryDate',
addHtml: 'queryDateHtml'
}
],
// 表格
......@@ -209,6 +189,17 @@ export default {
baseData: {
productTypeList: [],
yqMerchantList: []
},
stockQueryDatePickerOptions: {
disabledDate(time) {
const minDate = new Date(2026, 1, 1)
minDate.setHours(0, 0, 0, 0)
const today = new Date()
const todayEnd = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 23, 59, 59)
return time.getTime() < minDate.getTime() || time.getTime() > todayEnd.getTime()
}
}
}
},
......@@ -238,6 +229,9 @@ export default {
},
beforeSearchFn() {
return new Promise(resolve => {
if (this.searchForm.queryDate) {
this.searchForm.queryDate = dayjs(this.searchForm.queryDate).format('YYYY-MM-DD') + ' 23:59:59'
}
this.tableSearchForm = this.$common.utils.deepClone(this.searchForm)
this.tableSearchForm.dataMonth = dayjs(new Date()).format('YYYY-MM')
resolve()
......@@ -245,7 +239,10 @@ export default {
},
handleInventoryDetails(row) {
this.stockInfo = row
console.log(this.stockInfo)
this.stockInfo = {
...this.stockInfo,
queryDate: this.searchForm.queryDate ? dayjs(this.searchForm.queryDate).format('YYYY-MM-DD') + ' 23:59:59' : ''
}
this.stockDetailDialogVisible = true
},
// 库存对账单
......@@ -312,7 +309,8 @@ export default {
yqMerchantId: '',
goodsType: '',
goodsSeries: '',
productCode: ''
productCode: '',
queryDate: ''
}
this.handleSearch()
},
......
......@@ -85,11 +85,11 @@ export default {
}
},
mounted() {
console.log('111')
if (this.recordInfo) {
this.searchForm.yqMerchantId = this.recordInfo.yqMerchantId
this.searchForm.upgradeGoodsId = this.recordInfo.upgradeGoodsId
this.searchForm.queryDate = this.recordInfo.queryDate?this.recordInfo.queryDate:''
}
},
......
<!--
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2026-04-13 14:29:05
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2026-04-22 18:17:00
* @FilePath: \scrm-micro-inventory\src\views\transferShipment\components\EllipsisTooltip.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<el-tooltip :content="displayContent || ''" :disabled="isDisabled" :placement="placement" effect="dark">
<div class="ellipsis-tooltip-content" @mouseenter="checkOverflow">
<div class="ellipsis-tooltip-content">{{ displayContent }}</div>
</div>
</el-tooltip>
</template>
<script>
export default {
name: "EllipsisTooltip",
props: {
content: {
type: [String, Number],
default: "",
},
placement: {
type: String,
default: "top",
},
},
computed: {
displayContent() {
// 处理空值情况,显示 '-'
if (this.content === null || this.content === undefined || this.content === '') {
return '-'
}
return String(this.content)
}
},
data() {
return {
isDisabled: true
};
},
methods: {
checkOverflow(e) {
const target = e.target;
if (target.scrollWidth > target.clientWidth) {
this.isDisabled = false;
} else {
this.isDisabled = true;
}
},
},
};
</script>
<style scoped lang="scss">
.ellipsis-tooltip-content {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
</style>
<!-- 驳回弹窗 -->
<template>
<GLDialog bigTitle="驳回" width="1080px" :visible.sync="dialogVisible" :hasFooter="true" :before-close="handleClose" class="rejectDialog" mode="big" okText="确认" cancelText="取消" @onCancel="handleClose" @onOk="handleRejectConfirm">
<div>
<div class="header" slot="header" style="padding: 10px 20px"></div>
<div class="d2-container-content">
<div class="address-info">
<div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }">
<span class="label-name">{{ item.label }}:</span>
<ellipsis-tooltip class="label-value" :content="detailInfo[item.prop]" />
</div>
</div>
<div class="reject-page edit-tmpl">
<div class="title">商品信息</div>
<div class="content-box">
<GLTable ref="purchaseOrderDetailTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf"></GLTable>
</div>
</div>
<el-form :rules="rejectRules" :model="formData" label-width="150px" ref="delivery-dialog-form">
<el-form-item label="驳回节点:" prop="rejectNode">
<el-select v-model="formData.rejectNode" placeholder="请选择驳回节点" style="width: 450px">
<el-option v-for="item in rejectNodeOptions" :key="item.id" :label="item.label" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="驳回原因:" prop="rejectCause">
<el-input type="textarea" placeholder="请输入驳回原因" maxlength="200" style="width: 450px;" :rows="4" show-word-limit v-model.trim="formData.rejectCause" class="dis-in-block reject-input" />
</el-form-item>
</el-form>
<p style="margin-left: 150px; color: #999999;">
说明:驳回后,整个调拨订单进行驳回,无法再重新进行发货操作。
</p>
<div class="examine-record">
<div class="title">审核记录</div>
<div class="log-box">
<div class="record-div" v-if="detailInfo.auditDetaiList && detailInfo.auditDetaiList.length">
<div class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index">
<div class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</div>
<div class="span-txt-two" style="font-weight: 500;">
<span>
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}
</span>
</div>
<div class="span-txt-two reviewer ellipsis">
审核人:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="bottom">
<span>{{ item.reviewedBy }}</span>
</el-tooltip>
</div>
<div class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</div>
<div v-if="item.remark" class="span-txt-two">
备注:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="bottom">
<span>{{ item.remark ? (item.remark.length > 5 ? item.remark.slice(0, 5) + '...' : item.remark) : '' }}</span>
</el-tooltip>
</div>
<div class="span-txt-two" v-if="[4, 6, 7, 9].includes(item.status)">
驳回原因:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="bottom">
<span>{{ item.rejectCause ? (item.rejectCause.length > 5 ? item.rejectCause.slice(0, 5) + '...' : item.rejectCause) : '' }}</span>
</el-tooltip>
</div>
</div>
</div>
<div class="emptyCom" v-else>
<img :src="emptyImgUrl" class="emptyImg" alt="" />
<span class="tips">暂无数据</span>
</div>
</div>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import EllipsisTooltip from './EllipsisTooltip.vue'
export default {
name: 'RejectDialog',
components: {
EllipsisTooltip
},
data() {
return {
userInfo: this.$globalState.session,
emptyImgUrl: url,
searchForm: {
allocateCode: ''
},
searchFormSearch: {},
rejectNodeOptions: [
{
id: 1,
label: '调拨商户'
},
{
id: 2,
label: '运营审核'
},
{
id: 3,
label: '商务审核'
}
],
examineStatusClass: {
2: 'greenSp',
4: 'redSp',
5: 'greenSp',
6: 'redSp',
7: 'redSp',
8: 'greenSp',
9: 'redSp'
},
statusForShow: {
2: { text: '运营审核', status: '通过' },
4: { text: '运营审核', status: '驳回' },
5: { text: '商务审核', status: '通过' },
6: { text: '商务审核', status: '驳回' },
7: { text: '调拨驳回', status: '驳回' },
8: { text: '总监审核', status: '通过' },
9: { text: '总监驳回', status: '驳回' }
},
rejectedForShow: {
1: { rejectedStatus: '调拨商户' },
2: { rejectedStatus: '运营审核' },
3: { rejectedStatus: '商务审核' }
},
getListApi: this.$apis.stockManage.getTransferGoodsInfo,
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode'
},
{
label: '规格',
prop: 'specificationData'
},
{
label: '系列',
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '调拨数量',
prop: 'allocateNumber',
formatter: cellValue => {
const qty = cellValue.allocateNumber ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调入门店库存',
prop: 'inStockQty',
formatter: cellValue => {
const qty = cellValue.inStockQty ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调出门店库存',
prop: 'outStockQty',
formatter: cellValue => {
const qty = cellValue.outStockQty ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '膜卷号',
prop: 'filmRollNo'
}
]
},
infoList: [
{ label: '调出仓库', prop: 'callOutYqMerchantName' },
{ label: '调出门店', prop: 'callOutMerchantName' },
{ label: '调入仓库', prop: 'callInYqMerchantName' },
{ label: '调入门店', prop: 'callInMerchantName' },
{ label: '备注', prop: 'remark', isRemark: true }
],
rejectRules: {
rejectNode: [{ required: true, message: '请选择驳回节点', trigger: 'change' }],
rejectCause: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
},
formData: {},
detailInfo: {},
auditDetaiList: []
}
},
props: {
rejectVisible: {
type: Boolean,
default: false
},
rejectData: {
type: Object,
default: () => ({})
}
},
computed: {
dialogVisible: {
get() {
if (this.rejectVisible) {
this.getInfoDetail()
}
return this.rejectVisible
},
set(val) {
this.$emit('update:rejectVisible', val)
}
}
},
mounted() {},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.allocateCode = this.rejectData.allocateCode
this.searchFormSearch = this.$common.utils.deepClone(this.searchForm)
resolve()
})
},
getInfoDetail() {
this.$apis.stockManage.getTransferAuitInfo({ allocateCode: this.rejectData.allocateCode }).then(res => {
res?.auditDetaiList?.forEach(item => {
item.reviewedDateFormat = item.reviewedDate ? dayjs(item.reviewedDate).format('YYYY-MM-DD HH:mm:ss') : ''
})
this.detailInfo = res
})
},
handleClose() {
this.$emit('rejectClose')
},
handleRejectConfirm() {
this.$refs['delivery-dialog-form'].validate(valid => {
if (valid) {
this.$apis.stockManage
.deliveryReject({ fromSaas: true, userName: this.userInfo.merchantName, allocateCode: this.rejectData.allocateCode, rejectNode: this.formData.rejectNode, rejectCause: this.formData.rejectCause })
.then(res => {
if (res) {
this.handleClose(true)
this.$message.success('驳回成功')
}
})
.catch(() => {
this.handleClose()
})
}
})
}
}
}
</script>
<style scoped lang="scss">
.rejectDialog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
.address-info {
display: flex;
box-sizing: border-box;
flex-wrap: wrap;
width: 100%;
padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
.info-item {
width: 33.33%;
display: flex;
align-items: center;
margin-bottom: 10px;
padding-right: 15px;
box-sizing: border-box;
.label-name {
white-space: nowrap;
min-width: fit-content;
}
.label-value {
flex: 1;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
&.remark-item {
flex-grow: 1;
width: 33.33%;
}
}
}
.reject-page {
margin-bottom: 20px;
.title {
margin: 16px 0;
height: 22px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
padding-bottom: 10px;
border-bottom: 1px solid #e5e5e5;
}
}
.examine-record {
min-height: 157px;
margin-top: 23px;
.log-box {
margin-top: 20px;
border-radius: 4px;
background: #fafafa;
padding: 16px;
}
.title {
margin: 16px 0;
height: 22px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
padding-bottom: 10px;
border-bottom: 1px solid #e5e5e5;
}
.dot {
width: 6px;
height: 6px;
background: #185efe;
border-radius: 6px;
display: inline-block;
}
.record-div {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
.record-div-d {
display: flex;
align-items: center;
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
}
.span-txt-one {
height: 21px;
font-weight: 500;
color: #333333;
}
.reviewer {
width: 140px;
&.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.span-txt-two {
margin-left: 40px;
}
.greenSp {
color: #4aca74;
}
.redSp {
color: #eb4e4e;
}
}
.emptyCom {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.emptyImg {
width: 64px;
}
.tips {
font-size: 14px;
color: #999999;
margin: 20px 0;
}
}
}
</style>
<!-- 发货弹窗 -->
<template>
<GLDialog bigTitle="发货" width="1300px" :visible.sync="dialogVisible" :hasFooter="true" :before-close="handleClose" class="shipmentDialog" mode="big" okText="确认" cancelText="取消" @onCancel="handleClose" @onOk="submit">
<div>
<div class="header" slot="header" style="padding: 10px 20px"></div>
<div class="d2-container-content">
<div class="address-info">
<div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }">
<span class="label-name">{{ item.label }}:</span>
<ellipsis-tooltip class="label-value" :content="paramsObj[item.prop]" />
</div>
</div>
<div class="table-class">
<GLTable ref="purchaseOrderDetailTable" :hasPage="false" :table-params="tableParams" :table-data="tableList">
<template slot="nowPurNum" slot-scope="scope">
<div>
<el-input :class="{ 'border-red': !nowPurNumList[scope.index] && isSubmit }" placeholder="请输入" v-model="nowPurNumList[scope.index]" @input="e => handleInput(e, scope)"></el-input>
</div>
</template>
</GLTable>
</div>
<div class="form-content">
<el-form label-width="100px" :rules="dialogRules" :model="dialogData" ref="delivery-dialog-form">
<el-form-item label="承运单号:" prop="deliveryNumber">
<el-input maxlength="50" placeholder="请输入承运物流单号" v-model.trim="dialogData.deliveryNumber" class="dis-in-block" @input="deliveryNumberInput" />
</el-form-item>
<el-form-item label="承运公司:" prop="deliveryCompany">
<el-input placeholder="请输入承运物流公司" maxlength="20" v-model.trim="dialogData.deliveryCompany" class="dis-in-block" />
</el-form-item>
<el-form-item label="发货时间:" prop="deliveryDate">
<el-date-picker class="dis-in-block" v-model="dialogData.deliveryDate" type="datetime" placeholder="请选择发货时间"></el-date-picker>
</el-form-item>
</el-form>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import { limitPrice } from '@/common/format'
import EllipsisTooltip from './EllipsisTooltip.vue'
export default {
name: 'ShipmentDialog',
components: {
EllipsisTooltip
},
data() {
return {
showOptionInput: false,
addOptionValue: '',
editOptionIndex: -1,
editOptionValue: '',
// userInfo: this.$store.state.d2admin.user.info,
isSubmit: false,
dialogData: {},
deliveryCardList: [],
oldPurNumList: [],
nowPurNumList: [],
orderInfo: {},
hasPage: false,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode'
},
{
label: '规格',
prop: 'specificationData'
},
{
label: '系列',
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '调拨数量',
prop: 'allocateNumber',
formatter: cellValue => {
const qty = cellValue.allocateNumber ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '发货数量',
prop: '',
width: 124,
addHtml: 'nowPurNum'
},
{
label: '调入门店库存',
prop: 'inStockQty',
formatter: cellValue => {
const qty = cellValue.inStockQty ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调出门店库存',
prop: 'outStockQty',
formatter: cellValue => {
const qty = cellValue.outStockQty ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '膜卷号',
prop: 'filmRollNo'
}
]
},
dialogRules: {
deliveryCompany: [{ required: true, message: '请输入承运公司', trigger: 'blur' }],
deliveryNumber: [{ required: true, message: '请输入承运单号', trigger: 'blur' }],
deliveryDate: [{ required: true, message: '请选择发货时间', trigger: 'blur' }]
},
shippingWarehouseList: [],
infoList: [
{ label: '调出仓库', prop: 'callOutYqMerchantName' },
{ label: '调出门店', prop: 'callOutMerchantName' },
{ label: '调入仓库', prop: 'callInYqMerchantName' },
{ label: '调入门店', prop: 'callInMerchantName' },
{ label: '备注', prop: 'remark', isRemark: true }
]
}
},
props: {
shipmentVisible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: () => ({})
},
tableList: {
type: Array,
default: () => []
}
},
computed: {
dialogVisible: {
get() {
return this.shipmentVisible
},
set(val) {
this.$emit('update:shipmentVisible', val)
}
}
},
filters: {
formatCar(list) {
let str = list
.map(item => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
})
.join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
methods: {
handleClose() {
this.$emit('shipmentClose')
},
deliveryNumberInput(event, index) {
this.$set(this.dialogData, 'deliveryNumber', event.replace(/[^a-zA-Z0-9]/g, ''))
},
handleInput(val, scope) {
const _row = scope.scope
const _index = scope.index
const _oldVal = this.oldPurNumList[_index] || 0
const _maxVal = _row.allocateNumber - _row.deliveryNumber
this.nowPurNumList[_index] = limitPrice(val, _oldVal, 9999, 0, 0, _maxVal) || (val ? _maxVal : '')
this.oldPurNumList = JSON.parse(JSON.stringify(this.nowPurNumList))
},
submit() {
this.isSubmit = true
this.$refs['delivery-dialog-form'].validate(valid => {
if (valid) {
// 验证本次发货数量
if (this.nowPurNumList.some(item => !item || item <= 0)) {
this.$message({
message: '发货数量必须全部填写且不能为0',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
var params = {
...this.dialogData,
deliveryDate: dayjs(this.dialogData.deliveryDate).format('YYYY-MM-DD HH:mm:ss'),
orderCode: this.paramsObj.allocateCode,
deliveryDetailList: []
}
for (let idx = 0; idx < this.tableList.length; idx++) {
const item = this.tableList[idx]
if (this.nowPurNumList[idx] && this.nowPurNumList[idx] != 0) {
params.deliveryDetailList.push({
id: item.detailId,
purchaseNumber: this.nowPurNumList[idx]
})
}
}
this.$apis.stockManage
.batchDelicery(params)
.then(res => {
if (res) {
this.handleClose(true)
this.$message.success('操作成功')
}
})
.catch(() => {
this.handleClose(false)
})
}
})
}
},
watch: {
dialogVisible: {
handler(val) {
console.log(val, 'val')
if (val) {
this.$nextTick(() => {
console.log(this.tableList, 'this.tableList')
this.nowPurNumList = this.tableList?.map(() => '')
})
}
},
immediate: true
}
}
}
</script>
<style scoped lang="scss">
.shipmentDialog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
.address-info {
display: flex;
box-sizing: border-box;
flex-wrap: wrap;
width: 100%;
padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
.info-item {
width: 33.33%;
display: flex;
align-items: center;
margin-bottom: 10px;
padding-right: 15px;
box-sizing: border-box;
.label-name {
white-space: nowrap;
min-width: fit-content;
}
.label-value {
flex: 1;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
&.remark-item {
flex-grow: 1;
width: 33.33%;
}
}
}
.form-content {
margin-top: 16px;
.dis-in-block {
width: 432px;
}
}
.edit-order-dialog .el-input--medium.border-red .el-input__inner {
border: 1px solid #eb4e4e;
}
</style>
<!-- 调拨详情弹窗 -->
<template>
<GLDialog bigTitle="详细信息" width="1080px" :visible.sync="dialogVisible" :hasFooter="false" :before-close="handleClose" class="transferDetailDialog" mode="big" okText="关闭" @onCancel="handleClose" @onOk="handleClose">
<div v-if="dialogVisible" class="detail-content">
<!-- 基本信息 -->
<div class="address-info">
<div v-for="(item, index) in infoList" :key="index" class="info-item" :class="{ 'remark-item': item.isRemark }">
<span class="label-name">{{ item.label }}:</span>
<EllipsisTooltip class="label-value" :content="detailInfo[item.prop]" />
</div>
</div>
<!-- 商品列表表格 -->
<div class="table-class">
<GLTable ref="purchaseOrderDetailTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf">
<template slot="filmRollNo" slot-scope="scope">
<div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">
{{ scope.scope.filmRollList[0] }}
</div>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1">
<el-popover placement="top" width="200" trigger="hover">
<div class="film-roll-box">
<div class="title">
膜卷号
</div>
<div v-for="(subItem, subIndex) in scope.scope.filmRollList" :key="subIndex" class="merchant-item">
{{ subItem }}
</div>
</div>
<template #reference>
<div>
<span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span>
</div>
</template>
</el-popover>
</div>
<div v-else>
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span>
</div>
</template>
<template slot="carName" slot-scope="scope">
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<template #content>
<div class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">
{{ `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}
</div>
</div>
</template>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip>
<div v-else>
-
</div>
</template>
</GLTable>
</div>
<!-- 审核记录 -->
<div class="examine-record">
<div class="title">
审核记录
</div>
<div class="log-box">
<div v-if="detailInfo.auditDetaiList && detailInfo.auditDetaiList.length" class="record-div">
<div v-for="(item, index) in detailInfo.auditDetaiList" :key="index" class="record-div-d">
<div class="span-txt-one">
{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}
</div>
<div class="span-txt-two" style="font-weight: 500;">
<span>
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}
</span>
</div>
<div class="span-txt-two reviewer ellipsis">
审核人:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="right">
<span>{{ item.reviewedBy }}</span>
</el-tooltip>
</div>
<div class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</div>
<div v-if="item.remark" class="span-txt-two">
备注:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="right">
<span>
{{ item.remark ? (item.remark.length > 12 ? `${item.remark.slice(0, 12)}...` : item.remark) : '-' }}
</span>
</el-tooltip>
</div>
<div v-if="[4, 6, 7, 9].includes(item.status)" class="span-txt-two">
驳回原因:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="right">
<span>
{{ item.rejectCause ? (item.rejectCause.length > 12 ? `${item.rejectCause.slice(0, 12)}...` : item.rejectCause) : '' }}
</span>
</el-tooltip>
</div>
</div>
</div>
<div v-else class="emptyCom">
<img :src="emptyImgUrl" class="emptyImg" alt="" />
<span class="tips">暂无数据</span>
</div>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
import dayjs from 'dayjs'
import EllipsisTooltip from './EllipsisTooltip.vue'
export default {
name: 'TransferDetailDialog',
components: {
EllipsisTooltip
},
filters: {
formatCar(list) {
if (!list || !list.length) return '-'
let str = list
.map(item => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
})
.join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: () => ({})
},
hideContact: {
type: Boolean,
default: false
}
},
data() {
return {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
emptyImgUrl: require('@/assets/empty.png'),
getListApi: this.$apis.stockManage.getTransferGoodsInfo,
searchForm: {
allocateCode: ''
},
searchFormSearch: {},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode'
},
{
label: '规格',
prop: 'specificationData'
},
{
label: '系列',
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '调拨数量',
prop: 'allocateNumber',
formatter: cellValue => {
const qty = cellValue.allocateNumber ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '发货数量',
prop: 'deliveryNumber',
formatter: cellValue => {
const qty = cellValue.deliveryNumber ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调入门店库存',
prop: 'inStockQty',
width: 120,
formatter: cellValue => {
const qty = cellValue.inStockQty ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调出门店库存',
prop: 'outStockQty',
width: 120,
formatter: cellValue => {
const qty = cellValue.outStockQty ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '膜卷号',
prop: 'filmRollNo'
}
]
},
detailInfo: {},
statusForShow: {
2: { text: '运营审核', status: '通过' },
4: { text: '运营审核', status: '驳回' },
5: { text: '商务审核', status: '通过' },
6: { text: '商务审核', status: '驳回' },
7: { text: '调拨驳回', status: '驳回' },
8: { text: '总监审核', status: '通过' },
9: { text: '总监驳回', status: '驳回' }
}
}
},
computed: {
infoList() {
const list = []
if (!this.hideContact) {
list.push({ label: '收货人', prop: 'receiver' }, { label: '收货人电话', prop: 'phone' }, { label: '收货地址', prop: 'address' })
}
list.push({ label: '调出仓库', prop: 'callOutYqMerchantName' }, { label: '调出门店', prop: 'callOutMerchantName' }, { label: '调入仓库', prop: 'callInYqMerchantName' }, { label: '调入门店', prop: 'callInMerchantName' }, { label: '备注', prop: 'remark', isRemark: true })
return list
},
dialogVisible: {
get() {
if (this.visible) {
this.getInfoDetail()
}
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.allocateCode = this.paramsObj.allocateCode
this.searchFormSearch = this.$common.utils.deepClone(this.searchForm)
resolve()
})
},
handleClose() {
this.$emit('update:visible', false)
this.$emit('dialogClose')
},
getInfoDetail() {
this.$apis.stockManage.getTransferAuitInfo({ allocateCode: this.paramsObj.allocateCode }).then(res => {
if (res && res.auditDetaiList) {
res.auditDetaiList.forEach(item => {
item.reviewedDateFormat = item.reviewedDate ? dayjs(item.reviewedDate).format('YYYY-MM-DD HH:mm:ss') : ''
})
}
this.detailInfo = res || {}
// 强制更新视图
this.$forceUpdate()
})
}
}
}
</script>
<style scoped lang="scss">
.transferDetailDialog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
.car-type-list {
max-height: 300px;
overflow-y: scroll;
}
.address-info {
display: flex;
box-sizing: border-box;
flex-wrap: wrap;
width: 100%;
padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
.info-item {
width: 33.33%;
display: flex;
align-items: center;
margin-bottom: 10px;
padding-right: 15px;
box-sizing: border-box;
.label-name {
white-space: nowrap;
min-width: fit-content;
}
.label-value {
flex: 1;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
&.remark-item {
flex-grow: 1;
width: 33.33%;
}
}
}
.film-roll-box {
font-size: 12px;
color: #666666;
.title {
font-weight: 500;
color: #3a3a3a;
margin-bottom: 8px;
}
}
.examine-record {
min-height: 157px;
margin-top: 23px;
.log-box {
margin-top: 20px;
border-radius: 4px;
background: #fafafa;
padding: 16px;
}
.title {
margin: 16px 0;
height: 22px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
padding-bottom: 10px;
border-bottom: 1px solid #e5e5e5;
}
.record-div {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
.record-div-d {
display: flex;
align-items: center;
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
}
.span-txt-one {
height: 21px;
font-weight: 500;
color: #333333;
}
.reviewer {
width: 140px;
&.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.span-txt-two {
margin-left: 40px;
}
}
.emptyCom {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.emptyImg {
width: 64px;
}
.tips {
font-size: 14px;
color: #999999;
margin: 20px 0;
}
}
}
</style>
<!-- 调拨发货 -->
<template>
<div class="purchase transferShipment">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<h2>调拨发货</h2>
<div>
<GLButton type="primary" plain size="small" @click="batchShipment" fn="批量发货">批量发货</GLButton>
</div>
</div>
<GLTable ref="transferShipmentTable" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" @selectionTable="handleSelectionChange">
<template slot="receiver" slot-scope="scope">
<div v-if="scope.scope.receiver">
<el-popover v-if="scope.scope.receiver.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.receiver) }}
</div>
<template #reference>
<div>
{{ spanFilter(scope.scope.receiver, 12) }}
</div>
</template>
</el-popover>
<div v-else>
{{ scope.scope.receiver }}
</div>
</div>
<span v-else>-</span>
</template>
<template slot="address" slot-scope="scope">
<div v-if="scope.scope.address">
<el-popover v-if="scope.scope.address.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.address) }}
</div>
<template #reference>
<div>
{{ spanFilter(scope.scope.address, 12) }}
</div>
</template>
</el-popover>
<div v-else>
{{ scope.scope.address }}
</div>
</div>
<span v-else>-</span>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button :data="scope.scope" type="text" size="small" @click="handleDetail(scope.scope)">查看</el-button>
<el-button v-if="scope.scope.deliveryStatus != 2&&scope.scope.billStatus != 7" :data="scope.scope" type="text" size="small" @click="handleShipment(scope.scope)">发货</el-button>
<el-button v-if="scope.scope.billStatus != 7 && scope.scope.deliveryStatus == 1" :data="scope.scope" type="text" size="small" @click="handleReject(scope.scope)">驳回</el-button>
</div>
</GLTable>
</div>
<shipment-dialog :shipment-visible="shipmentVisible" :table-list="shipmentTableList" :params-obj="shipmentDialogData" v-if="shipmentVisible" @shipmentClose="shipmentDialogClose" />
<reject-dialog :reject-visible="rejectVisible" :reject-data="rejectData" v-if="rejectVisible" @rejectClose="handleRejectClose" />
<transfer-detail-dialog :visible="transferDetailVisible" :params-obj="transferObj" v-if="transferDetailVisible" @dialogClose="handleTransferDetailClose" />
</div>
</template>
<script>
import transferDetailDialog from './components/transferDetailDialog.vue'
import RejectDialog from './components/rejectDialog.vue'
import shipmentDialog from './components/shipmentDialog.vue'
export default {
name: 'TransferShipment',
components: {
ShipmentDialog: shipmentDialog,
'shipment-dialog': shipmentDialog,
RejectDialog,
'reject-dialog': RejectDialog,
TransferDetailDialog: transferDetailDialog,
'transfer-detail-dialog': transferDetailDialog
},
data() {
return {
searchForm: {
queryCallOutMerchant: true,
allocateCode: '',
callInName: '',
deliveryStatus: '',
goodsName: '',
productCode: ''
},
tableSearchForm: {},
tableData: [],
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
showFormData: [
{
label: '调拨单号',
name: 'allocateCode',
type: 'input',
isClear: true
},
{
label: '调入方',
name: 'callInName',
type: 'input',
isClear: true
},
{
label: '发货状态',
name: 'deliveryStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'deliveryStatusOptions'
},
{
label: '商品名称',
name: 'goodsName',
type: 'input',
isClear: true
},
{
label: '商品编码',
name: 'productCode',
type: 'input',
isClear: true
}
],
getListApi: this.$apis.stockManage.getTransferShipmentList,
// 表格参数
tableParams: {
btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: 'list',
mutiSelectUniqueKey: 'id',
mutiSelectName: 'list',
checkSelectable: (row, index) => this.selectableFn(row, index),
tableOption: {
width: '160'
},
tableColumns: [
{
label: '调拨单号',
prop: 'allocateCode',
width: 150
},
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode'
},
{
label: '规格',
prop: 'specificationData'
},
{
label: '系列',
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '调拨数量',
prop: 'allocateNumber',
formatter: cellValue => {
const qty = cellValue.allocateNumber ?? '-'
const unit = this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调拨人',
prop: 'createdBy'
},
{
label: '调入门店',
prop: 'callInMerchantName'
},
{
label: '调入仓库',
prop: 'callInYqMerchantName'
},
{
label: '调出门店',
prop: 'callOutMerchantName'
},
{
label: '调出仓库',
prop: 'callOutYqMerchantName'
},
{
label: '收货人',
prop: 'receiver',
width: 120,
addHtml: 'receiver'
},
{
label: '收货人电话',
prop: 'phone',
width: 130
},
{
label: '收货地址',
prop: 'address',
width: 120,
addHtml: 'address'
},
{
label: '发货状态',
prop: 'deliveryStatus',
formatter: cellValue => {
return this.baseData.deliveryStatusOptions.find(item => item.confId === `${cellValue.deliveryStatus}`)?.confLabel || '-'
},
className: cellValue => {
return {
1: 'ashSpot',
2: 'greenSpot',
3: 'yellowSpot'
}[cellValue.deliveryStatus]
}
},
{
label: '订单状态',
prop: 'billStatus',
formatter: cellValue => {
return this.baseData.billStatusOptions.find(item => item.confId == cellValue.billStatus)?.confLabel || '-'
},
className: cellValue => {
return {
5: 'greenSpot',
7: 'redSpot'
}[cellValue.billStatus]
}
}
]
},
// 查看
transferDetailVisible: false,
// 驳回
rejectVisible: false,
// 发货
shipmentVisible: false,
// 基本数据
baseData: {
deliveryStatusOptions: [
{
confId: '1',
confLabel: '未发货'
},
{
confId: '3',
confLabel: '部分发货'
},
{
confId: '2',
confLabel: '全部发货'
}
],
billStatusOptions: [
{
confId: '5',
confLabel: '已审核'
},
{
confId: '7',
confLabel: '已驳回'
}
]
},
paramsObj: {},
selectedList: [],
shipmentTableList: [],
shipmentDialogData: {},
rejectData: {}
}
},
watch: {
rejectVisible(val) {
if (!val) {
this.rejectData = {}
this.$nextTick(() => {
this.auditDetaiList = []
this.$refs['delivery-dialog-form'] && this.$refs['delivery-dialog-form'].clearValidate()
})
}
}
},
mounted() {
this.getBaseData()
},
methods: {
getBaseData() {
const allOpt = {
confId: '',
confLabel: '全部'
}
this.showFormData.forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName]) {
this.baseData[item.optionsName].unshift(allOpt)
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
spanFilter(ele, lenght) {
if (ele) {
const text = `${ele}`
return lenght ? (text?.length > lenght ? text.substring(0, lenght) + '\u2026' : text.substring(0, lenght)) : text
} else {
return '-'
}
},
selectableFn(row, index) {
if (this.selectedList.length) {
return this.selectedList?.some(val => val.allocateCode == row.allocateCode) && (row.deliveryStatus == 1 || row.deliveryStatus == 3)
} else {
return row.deliveryStatus == 1 || row.deliveryStatus == 3
}
},
handleSelectionChange(selection) {
this.selectedList = selection
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
getParams() {
let params = this.$common.utils.deepClone(this.searchForm)
return params
},
handleSearch() {
this.$refs.transferShipmentTable.refreshTable(true)
},
handleReset() {
for (const key in this.searchForm) {
this.searchForm[key] = ''
}
this.searchForm.queryCallOutMerchant = true
this.$refs.transferShipmentTable.refreshTable(true)
},
handleExport() {
let params = this.tableSearchForm
// params.method = 'dj.api.smarcarlife.purchaseOrder.export.async'
params.method = 'dj.api.life.operatorreview.exportExcel.async'
const list = [
...this.dowloadList,
{
name: '调拨发货',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
batchShipment() {
if (!this.selectedList.length) {
// 未选择
this.$message.error('请选择要发货的订单')
return
}
const target = this.selectedList[0]
this.shipmentTableList = this.$common.utils.deepClone(this.selectedList)
this.shipmentDialogData.callOutYqMerchantName = target.callOutYqMerchantName
this.shipmentDialogData.callOutMerchantName = target.callOutMerchantName
this.shipmentDialogData.callInYqMerchantName = target.callInYqMerchantName
this.shipmentDialogData.callInMerchantName = target.callInMerchantName
this.shipmentDialogData.remark = target.remark
this.shipmentDialogData.allocateCode = target.allocateCode
this.shipmentVisible = true
},
shipmentDialogClose(obj) {
this.shipmentVisible = false
this.$refs.transferShipmentTable.refreshTable(true)
},
// 查看详情
handleDetail(row) {
this.transferObj = {
allocateCode: row.allocateCode,
merchantName: row.merchantName,
purchaseType: row.purchaseType
}
this.transferDetailVisible = true
},
// 发货
handleShipment(row) {
this.shipmentTableList = [row]
this.shipmentDialogData.callOutYqMerchantName = row.callOutYqMerchantName
this.shipmentDialogData.callOutMerchantName = row.callOutMerchantName
this.shipmentDialogData.callInYqMerchantName = row.callInYqMerchantName
this.shipmentDialogData.callInMerchantName = row.callInMerchantName
this.shipmentDialogData.remark = row.remark
this.shipmentDialogData.allocateCode = row.allocateCode
this.shipmentVisible = true
},
// 驳回
handleReject(row) {
this.rejectData = {
allocateCode: row.allocateCode
}
this.rejectVisible = true
},
handleRejectClose(obj) {
this.rejectVisible = false
this.$refs.transferShipmentTable.refreshTable(true)
},
// 查看详情弹窗关闭
handleTransferDetailClose() {
this.transferDetailVisible = !this.transferDetailVisible
}
}
}
</script>
<style lang="scss" scoped>
@import '@/assets/css/mixin.scss';
.transferShipment {
.table-header {
@include space-between_center;
margin-bottom: 10px;
h2 {
font-weight: 600;
font-size: 16px;
color: #333;
}
}
.table-btns {
display: flex;
align-items: center;
}
}
::v-deep .el-table__header-wrapper .has-gutter .el-checkbox {
display: none;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!