|
@@ -76,69 +76,11 @@
|
|
bordered>
|
|
bordered>
|
|
<!-- 销售单号 -->
|
|
<!-- 销售单号 -->
|
|
<template slot="salesBillNo" slot-scope="text, record">
|
|
<template slot="salesBillNo" slot-scope="text, record">
|
|
- <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
|
|
|
+ <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 下推单号 -->
|
|
<!-- 下推单号 -->
|
|
<template slot="dispatchBillNo" slot-scope="text, record">
|
|
<template slot="dispatchBillNo" slot-scope="text, record">
|
|
- <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.dispatchBillNo }}</span>
|
|
|
|
- </template>
|
|
|
|
- <!-- 财务状态 -->
|
|
|
|
- <template slot="financialStatus" slot-scope="text, record">
|
|
|
|
- <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.financialStatusDictValue" />
|
|
|
|
- </template>
|
|
|
|
- <!-- 操作 -->
|
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
|
- <a-button
|
|
|
|
- size="small"
|
|
|
|
- type="link"
|
|
|
|
- class="button-warning"
|
|
|
|
- v-if="record.billStatus == 'WAIT_AUDIT'"
|
|
|
|
- @click="handleEexamine(record)"
|
|
|
|
- >审核</a-button>
|
|
|
|
- <a-button
|
|
|
|
- size="small"
|
|
|
|
- type="link"
|
|
|
|
- v-if="record.billStatus == 'WAIT_OUT_WAREHOUSE'"
|
|
|
|
- class="button-primary"
|
|
|
|
- @click="handleSend(record)"
|
|
|
|
- >出库</a-button>
|
|
|
|
- <a-button
|
|
|
|
- size="small"
|
|
|
|
- type="link"
|
|
|
|
- class="button-info"
|
|
|
|
- v-if="record.salesBillSource == 'SALES' && record.billStatus !== 'CANCEL' && record.billStatus !== 'FINISH' && record.billStatus != 'WAIT_OUT_WAREHOUSE'"
|
|
|
|
- @click="handleEdit(record)"
|
|
|
|
- >
|
|
|
|
- 编辑
|
|
|
|
- </a-button>
|
|
|
|
- <a-button
|
|
|
|
- size="small"
|
|
|
|
- type="link"
|
|
|
|
- class="button-error"
|
|
|
|
- v-if="record.salesBillSource == 'SALES' && record.billStatus !== 'FINISH' && record.financialStatus !== 'FINISH'"
|
|
|
|
- @click="handleDel(record)"
|
|
|
|
- >
|
|
|
|
- 删除
|
|
|
|
- </a-button>
|
|
|
|
- <a-button
|
|
|
|
- size="small"
|
|
|
|
- type="link"
|
|
|
|
- class="button-info"
|
|
|
|
- v-if="record.salesBillSource == 'PURCHASE' && record.billStatus !== 'CANCEL' && record.billStatus !== 'FINISH' && record.billStatus != 'WAIT_OUT_WAREHOUSE'&& record.billStatus != 'AUDIT_REJECT'"
|
|
|
|
- @click="handleEdit(record)"
|
|
|
|
- >
|
|
|
|
- 改单
|
|
|
|
- </a-button>
|
|
|
|
- <a-button
|
|
|
|
- size="small"
|
|
|
|
- type="link"
|
|
|
|
- class="button-error"
|
|
|
|
- v-if="record.salesBillSource == 'PURCHASE' && record.billStatus !== 'FINISH' && record.financialStatus !== 'FINISH'&& record.billStatus != 'AUDIT_REJECT'&& record.billStatus != 'WAIT_OUT_WAREHOUSE'"
|
|
|
|
- @click="handleDel(record)"
|
|
|
|
- >
|
|
|
|
- 取消
|
|
|
|
- </a-button>
|
|
|
|
- <span v-if="record.billStatus == 'FINISH'||(record.salesBillSource == 'PURCHASE'&&record.billStatus == 'AUDIT_REJECT')">--</span>
|
|
|
|
|
|
+ <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-card>
|
|
</a-card>
|
|
@@ -148,7 +90,7 @@
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import custList from '@/views/common/custList.js'
|
|
import custList from '@/views/common/custList.js'
|
|
-import { salesList, salesDel, salesWriteAudit, salesWriteStockOut, salesCount } from '@/api/sales'
|
|
|
|
|
|
+import { dispatchlList, dispatchQueryCount } from '@/api/dispatch'
|
|
export default {
|
|
export default {
|
|
name: 'TableList',
|
|
name: 'TableList',
|
|
components: { STable, VSelect, custList },
|
|
components: { STable, VSelect, custList },
|
|
@@ -168,17 +110,15 @@ export default {
|
|
},
|
|
},
|
|
totalData: {
|
|
totalData: {
|
|
totalAmount: 0,
|
|
totalAmount: 0,
|
|
- totalCategory: 0,
|
|
|
|
totalQty: 0,
|
|
totalQty: 0,
|
|
totalRecord: 0
|
|
totalRecord: 0
|
|
},
|
|
},
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
- { title: '区域', dataIndex: 'shippingAddrCountyName', width: 120, align: 'center' },
|
|
|
|
- { title: '省份', dataIndex: 'shippingAddrProvinceName', width: 120, align: 'center' },
|
|
|
|
|
|
+ // { title: '区域', dataIndex: 'shippingAddrCountyName', width: 120, align: 'center' },
|
|
|
|
+ // { title: '省份', dataIndex: 'shippingAddrProvinceName', width: 120, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
- { title: '单据来源', dataIndex: 'salesBillSource', width: 120, align: 'center' },
|
|
|
|
{ title: '下推单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: 210, align: 'center' },
|
|
{ title: '下推单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: 210, align: 'center' },
|
|
{ title: '关联销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 210, align: 'center' },
|
|
{ title: '关联销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 210, 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 },
|
|
@@ -204,11 +144,11 @@ export default {
|
|
this.queryParam.endDate = undefined
|
|
this.queryParam.endDate = undefined
|
|
}
|
|
}
|
|
// 查询总计
|
|
// 查询总计
|
|
- salesCount(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
|
|
+ dispatchQueryCount(Object.assign(parameter, this.queryParam)).then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
this.totalData = Object.assign(this.totalData, res.data || {})
|
|
this.totalData = Object.assign(this.totalData, res.data || {})
|
|
})
|
|
})
|
|
- return salesList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
|
|
+ return dispatchlList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
const data = res.data
|
|
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++) {
|
|
@@ -225,83 +165,9 @@ export default {
|
|
disabledDate (date, dateStrings) {
|
|
disabledDate (date, dateStrings) {
|
|
return date && date.valueOf() > Date.now()
|
|
return date && date.valueOf() > Date.now()
|
|
},
|
|
},
|
|
- // 审核
|
|
|
|
- handleEexamine (row) {
|
|
|
|
- const _this = this
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '请点击下方按钮确认操作?',
|
|
|
|
- centered: true,
|
|
|
|
- closable: true,
|
|
|
|
- okText: '审核通过',
|
|
|
|
- cancelText: '审核不通过',
|
|
|
|
- onOk () {
|
|
|
|
- _this.auditOrder(row.id, 'WAIT_OUT_WAREHOUSE')
|
|
|
|
- },
|
|
|
|
- onCancel (e) {
|
|
|
|
- if (!e.triggerCancel) {
|
|
|
|
- _this.auditOrder(row.id, 'AUDIT_REJECT')
|
|
|
|
- }
|
|
|
|
- _this.$destroyAll()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- auditOrder (id, billStatus) {
|
|
|
|
- salesWriteAudit({
|
|
|
|
- id,
|
|
|
|
- billStatus
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.$message.success(res.message)
|
|
|
|
- this.$refs.table.refresh()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 出库
|
|
|
|
- handleSend (row) {
|
|
|
|
- const _this = this
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '确认要出库吗?',
|
|
|
|
- centered: true,
|
|
|
|
- closable: true,
|
|
|
|
- onOk () {
|
|
|
|
- salesWriteStockOut({
|
|
|
|
- salesBillSn: row.salesBillSn
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 详情
|
|
// 详情
|
|
- handleDetail (row) {
|
|
|
|
- this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
|
|
|
|
- },
|
|
|
|
- // 编辑
|
|
|
|
- handleEdit (row) {
|
|
|
|
- this.$router.push({ name: 'salesEdit', params: { id: row.id, sn: row.salesBillSn, priceType: row.priceType } })
|
|
|
|
- },
|
|
|
|
- // 删除
|
|
|
|
- handleDel (row) {
|
|
|
|
- const _this = this
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '确认要删除吗?',
|
|
|
|
- centered: true,
|
|
|
|
- closable: true,
|
|
|
|
- onOk () {
|
|
|
|
- salesDel({ id: row.id }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ handleDetail (row, type) {
|
|
|
|
+ this.$router.push({ name: type == 0 ? 'salesDetail' : 'pushOrderDetail', params: { sn: row.salesBillSn } })
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|