|
|
|
@ -130,6 +130,7 @@ |
|
|
|
<el-tab-pane :label="currentRow.cmcInvoice+'明细'" name="detail"> |
|
|
|
<el-button v-show="currentRow.notifyStatus!=='订单取消'" @click="openCreateDetailModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button> |
|
|
|
<el-button v-show="currentRow.notifyStatus!=='订单取消'" @click="importDetailModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'改单导入'}}</el-button> |
|
|
|
<el-button v-show="currentRow.notifyStatus!=='订单取消'" @click="fixTtlAmountHandle()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'TTL Amount修正'}}</el-button> |
|
|
|
<el-table ref="detailTable" |
|
|
|
:height="height" |
|
|
|
:data="dataList2" :cell-style="cellStyleDetail" |
|
|
|
@ -730,7 +731,8 @@ |
|
|
|
searchTemplateList, |
|
|
|
getCustomers, |
|
|
|
getCustomerAdd, |
|
|
|
getNotifyPartDetail |
|
|
|
getNotifyPartDetail, |
|
|
|
fixTtlAmount |
|
|
|
}from "@/api/ecss/ecss.js" |
|
|
|
import {getBuList}from '@/api/factory/site.js' |
|
|
|
import ExportUtil from "@/utils/export"; |
|
|
|
@ -1998,6 +2000,40 @@ |
|
|
|
this.$refs.delDetailUploadExcel.init(this.currentRow) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// TTL Amount修正方法 |
|
|
|
fixTtlAmountHandle(){ |
|
|
|
if (!this.currentRow || !this.currentRow.delNo) { |
|
|
|
this.$message.warning('请先选择一个发货通知单') |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm('确认要将所有明细的价税合计(sumPrice)赋值到TTL Amount字段吗?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
fixTtlAmount(this.currentRow).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message({ |
|
|
|
message: 'TTL Amount修正成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
|
// 刷新明细列表 |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
} else { |
|
|
|
this.$alert(data.msg || 'TTL Amount修正失败', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch((error) => { |
|
|
|
this.$alert('TTL Amount修正失败: ' + error, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
// 用户取消操作 |
|
|
|
}) |
|
|
|
}, |
|
|
|
refreshCurrentTabTable(){ |
|
|
|
if(this.currentRow===''||this.currentRow===null){ |
|
|
|
this.currentRow={site:'',delNo:''} |
|
|
|
|