|
@@ -93,7 +93,8 @@
|
|
|
<div class="table-operator">
|
|
|
<a-button type="primary" @click.stop="addShipDet" icon="plus">新增</a-button>
|
|
|
<a-button type="primary" icon="download" @click="handleExportXls('发运明细')">导出</a-button>
|
|
|
- <a-button type="primary" icon="download" @click="submit">提交</a-button>
|
|
|
+ <a-button type="primary" icon="download" @click="submit">批量提交</a-button>
|
|
|
+ <a-button type="primary" icon="download" @click="cancelSubmit">批量取消提交</a-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- 子表 :row-key="record => record.id" :pagination="ipagination-->
|
|
@@ -118,8 +119,8 @@
|
|
|
|
|
|
<!-- 单据状态 -->
|
|
|
<span slot="state" slot-scope="text, record">
|
|
|
- <a-tag color="orange" v-if="record.state == '0'">已保存</a-tag>
|
|
|
- <a-tag color="green" v-if="record.state == '1'">已提交</a-tag>
|
|
|
+ <a-tag color="orange" v-if="record.submitStatus == '0'">已保存</a-tag>
|
|
|
+ <a-tag color="green" v-if="record.submitStatus == '1'">已提交</a-tag>
|
|
|
</span>
|
|
|
|
|
|
<!-- 操作 默认按钮 未提交未推送-->
|
|
@@ -131,7 +132,7 @@
|
|
|
<a-dropdown>
|
|
|
<a class="ant-dropdown-link">更多<a-icon type="down"/></a>
|
|
|
<!-- 已保存 -->
|
|
|
- <a-menu slot="overlay" v-if="record.state == '0'">
|
|
|
+ <a-menu slot="overlay" v-if="record.submitStatus == '0'">
|
|
|
<a-menu-item>
|
|
|
<a @click="details(record)">详情</a>
|
|
|
</a-menu-item>
|
|
@@ -162,14 +163,14 @@
|
|
|
</a-menu>
|
|
|
|
|
|
<!-- 已提交 且 推送成功 -->
|
|
|
- <a-menu slot="overlay" v-if="record.pushState == '1' && record.state == '1'">
|
|
|
+ <a-menu slot="overlay" v-if="record.pushState == '1' && record.submitStatus == '1'">
|
|
|
<a-menu-item>
|
|
|
<a @click="details(record)">详情</a>
|
|
|
</a-menu-item>
|
|
|
</a-menu>
|
|
|
|
|
|
<!-- 已提交 且 推送失败 -->
|
|
|
- <a-menu slot="overlay" v-if="record.pushState == '2' && record.state == '1'">
|
|
|
+ <a-menu slot="overlay" v-if="record.pushState == '2' && record.submitStatus == '1'">
|
|
|
<a-menu-item>
|
|
|
<a @click="details(record)">详情</a>
|
|
|
</a-menu-item>
|
|
@@ -182,16 +183,16 @@
|
|
|
</a-menu>
|
|
|
|
|
|
<!-- 已提交 -->
|
|
|
- <a-menu slot="overlay" v-if="record.state == '1'">
|
|
|
+ <a-menu slot="overlay" v-if="record.submitStatus == '1'">
|
|
|
<a-menu-item>
|
|
|
<a @click="details(record)">详情</a>
|
|
|
</a-menu-item>
|
|
|
|
|
|
- <a-menu-item>
|
|
|
+ <!-- <a-menu-item>
|
|
|
<a-popconfirm title="确定取消提交吗?" ok-text="是" cancel-text="否" @confirm="cancelSubmit(record)">
|
|
|
<a href="javascript:void(0);" style="color:red;">取消提交</a>
|
|
|
</a-popconfirm>
|
|
|
- </a-menu-item>
|
|
|
+ </a-menu-item> -->
|
|
|
|
|
|
<a-menu-item>
|
|
|
<a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push(record)">
|
|
@@ -487,7 +488,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '单据状态',
|
|
|
- dataIndex: 'state',
|
|
|
+ dataIndex: 'submitStatus',
|
|
|
scopedSlots: { customRender: 'state' },
|
|
|
fixed: 'right',
|
|
|
width: 90,
|
|
@@ -580,7 +581,7 @@ export default {
|
|
|
this.$refs.declareElementsModal.declareElements = res.result
|
|
|
// 子表赋值
|
|
|
this.$refs.declareElementsModal.declareElementsData = res.result.syDeclarationElementsItemList
|
|
|
- if(record.pushState == '1' && record.state == '1'){
|
|
|
+ if(record.pushState == '1' && record.submitStatus == '1'){
|
|
|
this.$refs.declareElementsModal.pushState = true
|
|
|
}
|
|
|
}
|
|
@@ -590,7 +591,6 @@ export default {
|
|
|
|
|
|
// 维护款号成分
|
|
|
itemNumberElement(record) {
|
|
|
- debugger
|
|
|
this.$refs.itemNumEleModal.itemNumEleModVis = true
|
|
|
this.$refs.itemNumEleModal.editItemNumber.itemIds = record.itemIds
|
|
|
this.$refs.itemNumEleModal.editItemNumber.itemNumber = record.itemNumber
|
|
@@ -636,7 +636,10 @@ export default {
|
|
|
item.manualYarnFlag = res.result.syShippingDetailsItemList[0].manualYarnFlag
|
|
|
item.customsDeclarationUnitPrice = item.salesUnitPrice - item.ymoney
|
|
|
if(item.manualYarnFlag === 0){
|
|
|
- this.$refs.editShipDetDrawer.manualYarnDisabled = true
|
|
|
+ item.manualYarnUnitPrice = null
|
|
|
+ item.manualYarnProportion = null
|
|
|
+ this.$refs.editShipDetDrawer.manualYarnDisabled = true
|
|
|
+ this.$forceUpdate()
|
|
|
}else {
|
|
|
this.$refs.editShipDetDrawer.manualYarnDisabled = false
|
|
|
}
|
|
@@ -665,11 +668,13 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
submitShipment({ submitListId: this.selectedRowKeys, type: '1' }).then(res => {
|
|
|
if (res.success) {
|
|
|
- debugger
|
|
|
- // console.log('提交成功,单据状态改为【已提交】')
|
|
|
- // this.shipmentListData.state = '1'
|
|
|
- // this.getShipmentList() // 渲染 发运明细列表
|
|
|
- // this.$message.success('提交成功')
|
|
|
+ console.log('提交成功,单据状态改为【已提交】')
|
|
|
+ this.shipmentListData.submitStatus = '1'
|
|
|
+ this.selectedRowKeys =[]
|
|
|
+ this.getShipmentList() // 渲染 发运明细列表
|
|
|
+ this.$message.success('提交成功')
|
|
|
+ }else {
|
|
|
+ this.$message.error(res.message)
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -678,12 +683,15 @@ export default {
|
|
|
cancelSubmit(record) {
|
|
|
console.log('取消订单id:', record.id)
|
|
|
this.$nextTick(() => {
|
|
|
- cancelSubmitShipment({ id: record.id, type: '2' }).then(res => {
|
|
|
+ cancelSubmitShipment({ submitListId: this.selectedRowKeys, type: '2' }).then(res => {
|
|
|
if (res.success) {
|
|
|
console.log('取消提交成功,单据状态改为【仅保存】')
|
|
|
- this.shipmentListData.state = '0'
|
|
|
+ this.shipmentListData.submitStatus = '0'
|
|
|
+ this.selectedRowKeys = []
|
|
|
this.getShipmentList() // 渲染 发运明细列表
|
|
|
this.$message.success('取消提交成功')
|
|
|
+ }else {
|
|
|
+ this.$message.error(res.message)
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -779,7 +787,6 @@ export default {
|
|
|
onSelectChange(keys,rows){
|
|
|
this.selectedRowKeys = keys;
|
|
|
this.selectedRows = rows;
|
|
|
- debugger
|
|
|
},
|
|
|
|
|
|
// 分页变化时触发
|