|
@@ -8,9 +8,9 @@
|
|
<a-form-item label="创建时间">
|
|
<a-form-item label="创建时间">
|
|
<a-range-picker
|
|
<a-range-picker
|
|
style="width:100%"
|
|
style="width:100%"
|
|
- id="examineVerifyList-bundleNamesss"
|
|
|
|
|
|
+ id="examineVerifyList-creatDate"
|
|
:disabledDate="disabledDate"
|
|
:disabledDate="disabledDate"
|
|
- v-model="queryParam.brand"
|
|
|
|
|
|
+ v-model="time"
|
|
:format="dateFormat"
|
|
:format="dateFormat"
|
|
:placeholder="['开始时间', '结束时间']" />
|
|
:placeholder="['开始时间', '结束时间']" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -29,10 +29,10 @@
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="打印状态">
|
|
<a-form-item label="打印状态">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.billStatus"
|
|
|
|
- ref="billStatus"
|
|
|
|
- id="examineVerifyList-billStatus"
|
|
|
|
- code="PAYMENT_TYPE"
|
|
|
|
|
|
+ v-model="queryParam.printStatus"
|
|
|
|
+ ref="printStatus"
|
|
|
|
+ id="examineVerifyList-printStatus"
|
|
|
|
+ code="PRINT_STATUS"
|
|
placeholder="请选择打印状态"
|
|
placeholder="请选择打印状态"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -44,7 +44,7 @@
|
|
v-model="queryParam.billStatus"
|
|
v-model="queryParam.billStatus"
|
|
ref="billStatus"
|
|
ref="billStatus"
|
|
id="examineVerifyList-billStatus"
|
|
id="examineVerifyList-billStatus"
|
|
- code="PAYMENT_TYPE"
|
|
|
|
|
|
+ code="DISPATCH_BILL_STATUS"
|
|
placeholder="请选择单据状态"
|
|
placeholder="请选择单据状态"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -61,109 +61,114 @@
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- alert -->
|
|
|
|
+ <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
|
+ <div slot="message">
|
|
|
|
+ 总售价::<strong>{{ totalData.totalAmount }}</strong>元;
|
|
|
|
+ 总单数:<strong>{{ totalData.totalRecord }}</strong>;
|
|
|
|
+ 总款数::<strong>{{ totalData.totalCategory }}</strong>;
|
|
|
|
+ 总数量::<strong>{{ totalData.totalQty }}</strong>;
|
|
|
|
+ </div>
|
|
|
|
+ </a-alert>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <div style="margin-bottom: 15px">
|
|
|
|
- <a-button type="primary" id="examineVerifyList-export" :disabled="!hasSelected" :loading="loading" @click="handleBatchAudit">
|
|
|
|
- 批量审核
|
|
|
|
- </a-button>
|
|
|
|
- <span style="margin-left: 8px">
|
|
|
|
- <template v-if="hasSelected">
|
|
|
|
- {{ `已选 ${selectedRowKeys.length} 项` }}
|
|
|
|
- </template>
|
|
|
|
- </span>
|
|
|
|
- </div>
|
|
|
|
<s-table
|
|
<s-table
|
|
class="sTable"
|
|
class="sTable"
|
|
ref="table"
|
|
ref="table"
|
|
size="default"
|
|
size="default"
|
|
- :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:showPagination="false"
|
|
:showPagination="false"
|
|
- :scroll="{ x: 1680 }"
|
|
|
|
|
|
+ :scroll="{ x: 1680, y:tableHeight }"
|
|
bordered>
|
|
bordered>
|
|
- <!-- 状态 -->
|
|
|
|
- <template slot="status" slot-scope="text, record">
|
|
|
|
- <a-tag :color="record.status==1?'green':'red'" >{{ record.status==1? '待提交': '待单据审核' }}</a-tag>
|
|
|
|
|
|
+ <!-- 下推单号 -->
|
|
|
|
+ <template slot="dispatchBillNo" slot-scope="text, record">
|
|
|
|
+ <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.dispatchBillNo }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
- <a-button size="small" type="link" @click="handleExamine(record)" id="examineVerifyList-examine-btn">备货审核</a-button>
|
|
|
|
- <a-divider type="vertical" style="margin: 0;" />
|
|
|
|
- <a-button size="small" type="link" @click="handleDetail(record)" id="examineVerifyList-detail-btn">详情</a-button>
|
|
|
|
|
|
+ <a-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="link"
|
|
|
|
+ class="button-info"
|
|
|
|
+ v-if="record.billStatus=='WAIT_STOCK_UP_AUDIT'"
|
|
|
|
+ @click="handleExamine(record)"
|
|
|
|
+ id="examineVerifyList-examine-btn">备货审核</a-button>
|
|
|
|
+ <span v-else>--</span>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
|
|
|
|
|
|
+import { dispatchlList, dispatchQueryCount, dispatchStockUpAduit } from '@/api/dispatch'
|
|
import custList from '@/views/common/custList.js'
|
|
import custList from '@/views/common/custList.js'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
|
|
+import moment from 'moment'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, custList },
|
|
components: { STable, VSelect, custList },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
|
|
+ tableHeight: 0,
|
|
|
|
+ time: [],
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
- bundleName: '', // 品牌名称
|
|
|
|
- state: undefined // 状态
|
|
|
|
|
|
+ buyerName: undefined, // 客户名称
|
|
|
|
+ salesBillNo: '', // 销售单号
|
|
|
|
+ printStatus: undefined, // 打印状态
|
|
|
|
+ billStatus: undefined // 业务状态
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
dateFormat: 'YYYY-MM-DD',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
- { title: '单据来源', dataIndex: 'creasteDate', width: 100, align: 'center' },
|
|
|
|
- { title: '销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center' },
|
|
|
|
|
|
+ { title: '单据来源', dataIndex: 'salesBillSourceDictValue', width: 100, align: 'center' },
|
|
|
|
+ { title: '销售单号', dataIndex: 'salesBillNo', width: 230, align: 'center' },
|
|
|
|
+ { title: '下推单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: 230, align: 'center' },
|
|
{ title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
- { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '总售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '备货时间', dataIndex: 'audsitTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '状态', scopedSlots: { customRender: 'status' }, width: 110, align: 'center' },
|
|
|
|
- { title: '打印状态', dataIndex: 'audsitsTime', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '打印次数', dataIndex: 'audsitTsime', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '备货时间', dataIndex: 'stockUpDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '业务状态', dataIndex: 'billStatusDictValue', width: 110, align: 'center' },
|
|
|
|
+ { title: '打印次数', dataIndex: 'stockUpPrintTimes', width: 100, align: 'center', customRender: function (text) { return text || '0' } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
selectedRowKeys: [], // Check here to configure the default column
|
|
selectedRowKeys: [], // Check here to configure the default column
|
|
loading: false,
|
|
loading: false,
|
|
|
|
+ totalData: {
|
|
|
|
+ totalAmount: 0,
|
|
|
|
+ totalQty: 0,
|
|
|
|
+ totalRecord: 0
|
|
|
|
+ },
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
- // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
|
- // const data = res.data
|
|
|
|
- // const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
- // for (var i = 0; i < data.list.length; i++) {
|
|
|
|
- // data.list[i].no = no + i + 1
|
|
|
|
- // }
|
|
|
|
- // this.disabled = false
|
|
|
|
- // return data
|
|
|
|
- // })
|
|
|
|
- const _this = this
|
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
|
- const data = {
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
- list: [
|
|
|
|
- { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
|
|
+ if (this.tableHeight == 0) {
|
|
|
|
+ this.tableHeight = window.innerHeight - 440
|
|
|
|
+ }
|
|
|
|
+ // 创建时间
|
|
|
|
+ if (this.time && this.time.length > 0) {
|
|
|
|
+ this.queryParam.beginDate = moment(this.time[0]).format(this.dateFormat)
|
|
|
|
+ this.queryParam.endDate = moment(this.time[1]).format(this.dateFormat)
|
|
|
|
+ } else {
|
|
|
|
+ this.queryParam.beginDate = undefined
|
|
|
|
+ this.queryParam.endDate = undefined
|
|
|
|
+ }
|
|
|
|
+ // 查询总计
|
|
|
|
+ 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 => {
|
|
|
|
+ const data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
}
|
|
}
|
|
- _this.disabled = false
|
|
|
|
- resolve(data)
|
|
|
|
|
|
+ this.disabled = false
|
|
|
|
+ return data
|
|
})
|
|
})
|
|
- },
|
|
|
|
- custData: [] // 客户 下拉数据
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- hasSelected () {
|
|
|
|
- return this.selectedRowKeys.length > 0
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -171,59 +176,50 @@ export default {
|
|
disabledDate (date, dateStrings) {
|
|
disabledDate (date, dateStrings) {
|
|
return date && date.valueOf() > Date.now()
|
|
return date && date.valueOf() > Date.now()
|
|
},
|
|
},
|
|
- filterOption (input, option) {
|
|
|
|
- return (
|
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
- )
|
|
|
|
- },
|
|
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
- this.queryParam.orderBundleNo = ''
|
|
|
|
- this.queryParam.orderBundle.custMobile = ''
|
|
|
|
- this.queryParam.bundleName = ''
|
|
|
|
- this.queryParam.itemName = ''
|
|
|
|
- this.oldTime = undefined
|
|
|
|
- this.newTime = undefined
|
|
|
|
|
|
+ this.queryParam.buyerName = undefined
|
|
|
|
+ this.queryParam.salesBillNo = ''
|
|
|
|
+ this.queryParam.billStatus = undefined
|
|
|
|
+ this.queryParam.printStatus = undefined
|
|
|
|
+ this.time = []
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
- // 批量审核
|
|
|
|
- handleExamine () {
|
|
|
|
|
|
+ // 审核
|
|
|
|
+ handleExamine (row) {
|
|
const _this = this
|
|
const _this = this
|
|
this.$confirm({
|
|
this.$confirm({
|
|
title: '提示',
|
|
title: '提示',
|
|
- content: '确认要审核通过吗?',
|
|
|
|
- okText: '确定',
|
|
|
|
- cancelText: '取消',
|
|
|
|
|
|
+ content: '请点击下方按钮确认操作?',
|
|
centered: true,
|
|
centered: true,
|
|
|
|
+ closable: true,
|
|
|
|
+ okText: '审核通过',
|
|
|
|
+ cancelText: '审核不通过',
|
|
onOk () {
|
|
onOk () {
|
|
- // delectRolePower({
|
|
|
|
- // id: row.id
|
|
|
|
- // }).then(res => {
|
|
|
|
- // console.log(res, 'res1111')
|
|
|
|
- // if (res.status == 200) {
|
|
|
|
- // _this.$message.success(res.message)
|
|
|
|
- // _this.$refs.table.refresh()
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
|
|
+ _this.auditOrder(row.dispatchBillSn, 'OUTING_WAREHOUSE')
|
|
|
|
+ },
|
|
|
|
+ onCancel (e) {
|
|
|
|
+ if (!e.triggerCancel) {
|
|
|
|
+ _this.auditOrder(row.dispatchBillSn, 'STOCK_UP_REJECT')
|
|
|
|
+ }
|
|
|
|
+ _this.$destroyAll()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ auditOrder (dispatchBillSn, billStatus) {
|
|
|
|
+ dispatchStockUpAduit({
|
|
|
|
+ dispatchBillSn,
|
|
|
|
+ billStatus
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ this.$refs.table.refresh()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 详情
|
|
// 详情
|
|
handleDetail (row) {
|
|
handleDetail (row) {
|
|
- this.$router.push({ path: `/salesManagement/examineVerify/detail/${row.id}` })
|
|
|
|
- },
|
|
|
|
- // 批量审核
|
|
|
|
- handleBatchAudit () {
|
|
|
|
- this.loading = true
|
|
|
|
- // ajax request after empty completing
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.loading = false
|
|
|
|
- this.selectedRowKeys = []
|
|
|
|
- }, 1000)
|
|
|
|
- },
|
|
|
|
- onSelectChange (selectedRowKeys) {
|
|
|
|
- console.log('selectedRowKeys changed: ', selectedRowKeys)
|
|
|
|
- this.selectedRowKeys = selectedRowKeys
|
|
|
|
|
|
+ this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn } })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|