|
@@ -195,12 +195,12 @@
|
|
</template>
|
|
</template>
|
|
<!-- 出库仓库 -->
|
|
<!-- 出库仓库 -->
|
|
<template slot="warehouseBox" slot-scope="text, record">
|
|
<template slot="warehouseBox" slot-scope="text, record">
|
|
- <a-tooltip placement="right" v-if="record.newWarehouseNameSet && record.newWarehouseNameSet.length>0">
|
|
|
|
|
|
+ <a-tooltip placement="right" v-if="record.warehouseNameSet && record.warehouseNameSet.length>0">
|
|
<template slot="title">
|
|
<template slot="title">
|
|
- <span>{{ record.newWarehouseNameSet.toString() }}</span>
|
|
|
|
|
|
+ <span>{{ record.warehouseNameSet.toString() }}</span>
|
|
</template>
|
|
</template>
|
|
<div class="warehouse_box">
|
|
<div class="warehouse_box">
|
|
- <span>{{ record.newWarehouseNameSet.toString() }}</span>
|
|
|
|
|
|
+ <span>{{ record.warehouseNameSet.toString() }}</span>
|
|
</div>
|
|
</div>
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
<div v-else>--</div>
|
|
<div v-else>--</div>
|
|
@@ -374,18 +374,18 @@ export default {
|
|
},
|
|
},
|
|
// 统计数据
|
|
// 统计数据
|
|
totalData: {
|
|
totalData: {
|
|
- totalAmount: 0,
|
|
|
|
- totalCategory: 0,
|
|
|
|
- totalQty: 0,
|
|
|
|
- totalRecord: 0,
|
|
|
|
- totalPushedQty: 0,
|
|
|
|
- totalDispatchQty: 0,
|
|
|
|
- totalCancelQty: 0,
|
|
|
|
- totalUnpushedQty: 0,
|
|
|
|
- totalPushedAmount: 0,
|
|
|
|
- totalCancelAmount: 0,
|
|
|
|
- totalUnpushedAmount: 0,
|
|
|
|
- totalDispatchAmount: 0
|
|
|
|
|
|
+ totalCategory: 0, // 总款数
|
|
|
|
+ totalQty: 0, // 总数量
|
|
|
|
+ totalRecord: 0, // 总单数
|
|
|
|
+ totalPushedQty: 0, // 已下推数量
|
|
|
|
+ totalDispatchQty: 0, // 已发货数量
|
|
|
|
+ totalCancelQty: 0, // 已取消数量
|
|
|
|
+ totalUnpushedQty: 0, // 待下推数量
|
|
|
|
+ totalAmount: 0, // 总售价
|
|
|
|
+ totalPushedAmount: 0, // 已下推金额
|
|
|
|
+ totalCancelAmount: 0, // 已取消金额
|
|
|
|
+ totalUnpushedAmount: 0, // 待下推金额
|
|
|
|
+ totalDispatchAmount: 0 // 已发货金额
|
|
},
|
|
},
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
@@ -393,6 +393,8 @@ export default {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
delete parameter.tableId
|
|
delete parameter.tableId
|
|
delete parameter.index
|
|
delete parameter.index
|
|
|
|
+
|
|
|
|
+ // 如果按业务状态排序
|
|
if (parameter.sortOrder) {
|
|
if (parameter.sortOrder) {
|
|
parameter['sortAlias'] = 'sales_bill'
|
|
parameter['sortAlias'] = 'sales_bill'
|
|
} else {
|
|
} else {
|
|
@@ -402,22 +404,15 @@ export default {
|
|
salesCount(Object.assign(parameter, this.queryParam)).then(res => {
|
|
salesCount(Object.assign(parameter, this.queryParam)).then(res => {
|
|
this.totalData = res.data || {}
|
|
this.totalData = res.data || {}
|
|
})
|
|
})
|
|
|
|
+ // 查询列表
|
|
return salesList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
return salesList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
|
|
+ // 计算编号
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
data.list.forEach((con, i) => {
|
|
data.list.forEach((con, i) => {
|
|
con.no = no + i + 1
|
|
con.no = no + i + 1
|
|
- const newWarehouseName = []
|
|
|
|
- if (con.warehouseNameSet) {
|
|
|
|
- con.warehouseNameSet.forEach(item => {
|
|
|
|
- if (item) {
|
|
|
|
- newWarehouseName.push(item)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- con.newWarehouseNameSet = newWarehouseName
|
|
|
|
- }
|
|
|
|
})
|
|
})
|
|
this.disabled = false
|
|
this.disabled = false
|
|
}
|
|
}
|
|
@@ -425,10 +420,10 @@ export default {
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 允许备货打印弹框
|
|
tipData: null, // 备货单信息
|
|
tipData: null, // 备货单信息
|
|
- tempSalesBillSn: null,
|
|
|
|
- // 允许备货打印
|
|
|
|
- selectedRowKeys: [],
|
|
|
|
|
|
+ tempSalesBillSn: null, // 关联的下推单sn
|
|
|
|
+ selectedRowKeys: [], // 允许备货打印选项
|
|
bhColumns: [
|
|
bhColumns: [
|
|
{
|
|
{
|
|
title: '备货单号',
|
|
title: '备货单号',
|
|
@@ -443,7 +438,8 @@ export default {
|
|
dataIndex: 'printStatusDictValue'
|
|
dataIndex: 'printStatusDictValue'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- showCols: [], // 列表显示列
|
|
|
|
|
|
+ // 列表列显示
|
|
|
|
+ showCols: [], // 已勾选的列
|
|
colsArr: [
|
|
colsArr: [
|
|
{
|
|
{
|
|
title: '已取消数量',
|
|
title: '已取消数量',
|
|
@@ -505,7 +501,7 @@ export default {
|
|
{ title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
]
|
|
]
|
|
-
|
|
|
|
|
|
+ // 根据权限及勾选按固定顺序动态显示列
|
|
arr.map(item => {
|
|
arr.map(item => {
|
|
if (this.$hasPermissions('M_salesQueryList_salesPrice')) {
|
|
if (this.$hasPermissions('M_salesQueryList_salesPrice')) {
|
|
item.isShow = ['totalAmount', 'totalPushedAmount', 'totalUnpushedAmount', 'totalConvertPromoGiftsAmount'].includes(item.dataIndex)
|
|
item.isShow = ['totalAmount', 'totalPushedAmount', 'totalUnpushedAmount', 'totalConvertPromoGiftsAmount'].includes(item.dataIndex)
|
|
@@ -514,7 +510,6 @@ export default {
|
|
item.isShow = this.showCols.includes(item.dataIndex)
|
|
item.isShow = this.showCols.includes(item.dataIndex)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- console.log(arr)
|
|
|
|
return arr.filter(item => !this.colsArr.find(k => k.value == item.dataIndex) || item.isShow)
|
|
return arr.filter(item => !this.colsArr.find(k => k.value == item.dataIndex) || item.isShow)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -532,22 +527,25 @@ export default {
|
|
_this.$store.state.app.curActionPermission = ''
|
|
_this.$store.state.app.curActionPermission = ''
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 时间 change
|
|
|
|
|
|
+ // 选择时间 change
|
|
dateChange (date) {
|
|
dateChange (date) {
|
|
this.queryParam.beginDate = date[0]
|
|
this.queryParam.beginDate = date[0]
|
|
this.queryParam.endDate = date[1]
|
|
this.queryParam.endDate = date[1]
|
|
},
|
|
},
|
|
|
|
+ // 选择客户
|
|
custChange (val) {
|
|
custChange (val) {
|
|
this.queryParam.buyerSn = val.key
|
|
this.queryParam.buyerSn = val.key
|
|
},
|
|
},
|
|
|
|
+ // 所在区域
|
|
subareaChange (val) {
|
|
subareaChange (val) {
|
|
this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
|
|
this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
|
|
},
|
|
},
|
|
|
|
+ // 打开批量转费用单页面
|
|
toWaitCostOrder () {
|
|
toWaitCostOrder () {
|
|
this.$router.push({ name: 'waitCostOrder' })
|
|
this.$router.push({ name: 'waitCostOrder' })
|
|
},
|
|
},
|
|
- // 新增
|
|
|
|
|
|
+ // 新增销售单先打开选择客户弹框
|
|
handleAdd () {
|
|
handleAdd () {
|
|
this.openModal = true
|
|
this.openModal = true
|
|
},
|
|
},
|
|
@@ -657,13 +655,14 @@ export default {
|
|
changeDaOpt (e) {
|
|
changeDaOpt (e) {
|
|
this.expenseOption = e.target.value
|
|
this.expenseOption = e.target.value
|
|
},
|
|
},
|
|
- // 转费用单
|
|
|
|
|
|
+ // 转费用单确定
|
|
expenseSave (data) {
|
|
expenseSave (data) {
|
|
if (data) {
|
|
if (data) {
|
|
this.openBaseModal = true
|
|
this.openBaseModal = true
|
|
this.$refs.expenseModal.setDetail(data, 'sales')
|
|
this.$refs.expenseModal.setDetail(data, 'sales')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 转费用单成功
|
|
expenseSaveOk (params) {
|
|
expenseSaveOk (params) {
|
|
expenseAccountSave(params).then(res => {
|
|
expenseAccountSave(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -690,16 +689,18 @@ export default {
|
|
this.showTipModal = true
|
|
this.showTipModal = true
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 关闭允许备货打印弹框
|
|
canselModal () {
|
|
canselModal () {
|
|
this.tipData = null
|
|
this.tipData = null
|
|
this.showTipModal = false
|
|
this.showTipModal = false
|
|
this.tempSalesBillSn = null
|
|
this.tempSalesBillSn = null
|
|
this.selectedRowKeys = []
|
|
this.selectedRowKeys = []
|
|
},
|
|
},
|
|
|
|
+ // 选择要备货打印的
|
|
onSelectChange (selectedRowKeys) {
|
|
onSelectChange (selectedRowKeys) {
|
|
this.selectedRowKeys = selectedRowKeys
|
|
this.selectedRowKeys = selectedRowKeys
|
|
},
|
|
},
|
|
- // 允许备货打印状态
|
|
|
|
|
|
+ // 确定允许备货打印
|
|
updatePrintStatus () {
|
|
updatePrintStatus () {
|
|
const isOne = this.tipData.length
|
|
const isOne = this.tipData.length
|
|
if (isOne > 1 && this.selectedRowKeys.length == 0) {
|
|
if (isOne > 1 && this.selectedRowKeys.length == 0) {
|
|
@@ -710,7 +711,6 @@ export default {
|
|
this.tipData.map(item => {
|
|
this.tipData.map(item => {
|
|
dispatchBillSnList.push(item.dispatchBillSn)
|
|
dispatchBillSnList.push(item.dispatchBillSn)
|
|
})
|
|
})
|
|
-
|
|
|
|
const params = {
|
|
const params = {
|
|
'salesBillSn': this.tempSalesBillSn,
|
|
'salesBillSn': this.tempSalesBillSn,
|
|
'dispatchBillSnList': isOne > 1 ? this.selectedRowKeys : dispatchBillSnList,
|
|
'dispatchBillSnList': isOne > 1 ? this.selectedRowKeys : dispatchBillSnList,
|
|
@@ -724,7 +724,7 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 重置
|
|
|
|
|
|
+ // 重置列表
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
|
|
this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
|
|
@@ -749,23 +749,22 @@ export default {
|
|
}
|
|
}
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
|
|
+ // 初始化
|
|
pageInit () {
|
|
pageInit () {
|
|
- const _this = this
|
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
- _this.setTableH()
|
|
|
|
|
|
+ this.setTableH()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 计算表格高度
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
this.tableHeight = window.innerHeight - tableSearchH - 260
|
|
this.tableHeight = window.innerHeight - tableSearchH - 260
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
|
|
+ // 展开收起
|
|
advanced (newValue, oldValue) {
|
|
advanced (newValue, oldValue) {
|
|
- const _this = this
|
|
|
|
- this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
|
- _this.setTableH()
|
|
|
|
- })
|
|
|
|
|
|
+ this.pageInit()
|
|
},
|
|
},
|
|
'$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
'$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
console.log(newValue)
|
|
console.log(newValue)
|