|
@@ -28,6 +28,11 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="收货客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
|
+ <dealerSubareaScopeList ref="shbuyerName" id="matchSoo-shbuyerName" @change="shcustChange" />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
<a-form-item label="业务状态">
|
|
<a-form-item label="业务状态">
|
|
<v-select
|
|
<v-select
|
|
v-model="queryParam.billStatus"
|
|
v-model="queryParam.billStatus"
|
|
@@ -38,39 +43,39 @@
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
<a-form-item label="单据状态">
|
|
<a-form-item label="单据状态">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.billStatus"
|
|
|
|
- ref="billStatus"
|
|
|
|
- id="matchSoo-billStatus"
|
|
|
|
- code="DISPATCH_BILL_STATUS"
|
|
|
|
|
|
+ v-model="queryParam.voidFlag"
|
|
|
|
+ ref="voidFlag"
|
|
|
|
+ id="pushOrder-voidFlag"
|
|
|
|
+ code="VOID_FLAG"
|
|
placeholder="请选择单据状态"
|
|
placeholder="请选择单据状态"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
<a-form-item label="对单状态">
|
|
<a-form-item label="对单状态">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.billStatus"
|
|
|
|
- ref="billStatus"
|
|
|
|
- id="matchSoo-billStatus"
|
|
|
|
- code="DISPATCH_BILL_STATUS"
|
|
|
|
|
|
+ v-model="queryParam.checkStatus"
|
|
|
|
+ ref="checkStatus"
|
|
|
|
+ id="matchSoo-checkStatus"
|
|
|
|
+ code="CHECK_STATUS"
|
|
placeholder="请选择对单状态"
|
|
placeholder="请选择对单状态"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="对单时间">
|
|
<a-form-item label="对单时间">
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
|
|
|
+ <rangeDate ref="checkDate" :value="checktime" @change="checkDateChange" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
<a-form-model-item label="所在区域">
|
|
<a-form-model-item label="所在区域">
|
|
<subarea id="matchSoo-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
<subarea id="matchSoo-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
<a-form-model-item label="地区">
|
|
<a-form-model-item label="地区">
|
|
<a-form-model-item prop="shippingAddrProvinceSn">
|
|
<a-form-model-item prop="shippingAddrProvinceSn">
|
|
<Area id="matchSoo-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
|
|
<Area id="matchSoo-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
|
|
@@ -119,8 +124,10 @@
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-warning"
|
|
class="button-warning"
|
|
|
|
+ v-if="record.checkStatus =='WAIT'&&record.voidFlag==0"
|
|
@click="handleAudit(record)"
|
|
@click="handleAudit(record)"
|
|
>对单通过</a-button>
|
|
>对单通过</a-button>
|
|
|
|
+ <span v-else>--</span>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-spin>
|
|
</a-spin>
|
|
@@ -130,14 +137,12 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
-import moment from 'moment'
|
|
|
|
-import getDate from '@/libs/getDate.js'
|
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
import Area from '@/views/common/area.js'
|
|
import Area from '@/views/common/area.js'
|
|
-import { dispatchlList, dispatchQueryCount } from '@/api/dispatch'
|
|
|
|
|
|
+import { dispatchlList, dispatchCheck } from '@/api/dispatch'
|
|
export default {
|
|
export default {
|
|
name: 'PushOrderManagementList',
|
|
name: 'PushOrderManagementList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
@@ -148,34 +153,28 @@ export default {
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
- time: [
|
|
|
|
- moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
|
- moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
|
- ],
|
|
|
|
|
|
+ time: [],
|
|
|
|
+ checktime: [],
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
- beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
|
|
|
+ beginDate: '',
|
|
|
|
+ endDate: '',
|
|
|
|
+ checkBeginDate: '',
|
|
|
|
+ checkEndDate: '',
|
|
buyerSn: undefined, // 客户名称
|
|
buyerSn: undefined, // 客户名称
|
|
|
|
+ receiverSn: undefined, // 收货客户
|
|
salesBillNo: '', // 销售单号
|
|
salesBillNo: '', // 销售单号
|
|
dispatchBillNo: '', // 备货单号
|
|
dispatchBillNo: '', // 备货单号
|
|
billStatus: undefined, // 业务状态
|
|
billStatus: undefined, // 业务状态
|
|
subareaSn: undefined,
|
|
subareaSn: undefined,
|
|
- shippingAddrProvinceSn: undefined
|
|
|
|
- },
|
|
|
|
- totalData: {
|
|
|
|
- totalAmount: 0,
|
|
|
|
- totalQty: 0,
|
|
|
|
- totalRecord: 0
|
|
|
|
|
|
+ voidFlag: undefined,
|
|
|
|
+ shippingAddrProvinceSn: undefined,
|
|
|
|
+ checkStatus: undefined
|
|
},
|
|
},
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- // 查询总计
|
|
|
|
- dispatchQueryCount(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
- this.totalData = Object.assign(this.totalData, res.data || {})
|
|
|
|
- })
|
|
|
|
return dispatchlList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
return dispatchlList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -199,17 +198,17 @@ export default {
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '14%', align: 'center' },
|
|
{ title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '14%', align: 'center' },
|
|
{ title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '14%', align: 'center' },
|
|
{ title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '14%', align: 'center' },
|
|
- { title: '发货编号', dataIndex: 'buyerName1', width: '6%', align: 'center' },
|
|
|
|
|
|
+ { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center' },
|
|
{ title: '客户名称', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '客户名称', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
- { title: '收货客户名称', dataIndex: 'buyerName2', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '产品款数', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
|
|
+ { title: '收货客户名称', dataIndex: 'receiverName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '产品款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '产品数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '产品数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '总售价', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '总售价', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '单据状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '单据状态', dataIndex: 'voidFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '对单状态', dataIndex: 'checkStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '对单状态', dataIndex: 'checkStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '对单人员', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '对单时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '对单人员', dataIndex: 'checkPersonName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '对单时间', dataIndex: 'checkDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
]
|
|
]
|
|
if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
@@ -224,9 +223,16 @@ export default {
|
|
this.queryParam.beginDate = date[0]
|
|
this.queryParam.beginDate = date[0]
|
|
this.queryParam.endDate = date[1]
|
|
this.queryParam.endDate = date[1]
|
|
},
|
|
},
|
|
|
|
+ checkDateChange (date) {
|
|
|
|
+ this.queryParam.checkBeginDate = date[0]
|
|
|
|
+ this.queryParam.checkEndDate = date[1]
|
|
|
|
+ },
|
|
custChange (val) {
|
|
custChange (val) {
|
|
this.queryParam.buyerSn = val.key
|
|
this.queryParam.buyerSn = val.key
|
|
},
|
|
},
|
|
|
|
+ shcustChange (val) {
|
|
|
|
+ this.queryParam.receiverSn = val.key
|
|
|
|
+ },
|
|
// 详情
|
|
// 详情
|
|
handleDetail (row, type) {
|
|
handleDetail (row, type) {
|
|
if (type == 0) {
|
|
if (type == 0) {
|
|
@@ -235,29 +241,48 @@ export default {
|
|
this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
|
|
this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 允许打印
|
|
|
|
|
|
+ // 对单
|
|
handleAudit (row) {
|
|
handleAudit (row) {
|
|
|
|
+ const _this = this
|
|
this.$confirm({
|
|
this.$confirm({
|
|
title: '操作提示',
|
|
title: '操作提示',
|
|
content: '确认对单通过吗?',
|
|
content: '确认对单通过吗?',
|
|
centered: true,
|
|
centered: true,
|
|
onOk () {
|
|
onOk () {
|
|
- console.log('OK')
|
|
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ dispatchCheck({ dispatchBillSn: row.dispatchBillSn }).then(res => {
|
|
|
|
+ _this.$message.info(res.message)
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ }
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
|
|
+ this.time = []
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
- this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
|
|
|
|
- this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
|
- this.queryParam.buyerSn = undefined
|
|
|
|
|
|
+ this.checktime = []
|
|
|
|
+ this.$refs.checkDate.resetDate(this.checktime)
|
|
this.$refs.dealerSubareaScopeList.resetForm()
|
|
this.$refs.dealerSubareaScopeList.resetForm()
|
|
- this.queryParam.salesBillNo = ''
|
|
|
|
- this.queryParam.dispatchBillNo = ''
|
|
|
|
- this.queryParam.billStatus = undefined
|
|
|
|
- this.queryParam.subareaSn = undefined
|
|
|
|
- this.queryParam.shippingAddrProvinceSn = undefined
|
|
|
|
|
|
+ this.$refs.shbuyerName.resetForm()
|
|
|
|
+ this.queryParam = {
|
|
|
|
+ beginDate: '',
|
|
|
|
+ endDate: '',
|
|
|
|
+ checkBeginDate: '',
|
|
|
|
+ checkEndDate: '',
|
|
|
|
+ buyerSn: undefined, // 客户名称
|
|
|
|
+ receiverSn: undefined, // 收货客户
|
|
|
|
+ salesBillNo: '', // 销售单号
|
|
|
|
+ dispatchBillNo: '', // 备货单号
|
|
|
|
+ billStatus: undefined, // 业务状态
|
|
|
|
+ subareaSn: undefined,
|
|
|
|
+ voidFlag: undefined,
|
|
|
|
+ shippingAddrProvinceSn: undefined,
|
|
|
|
+ checkStatus: undefined
|
|
|
|
+ }
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
pageInit () {
|
|
pageInit () {
|