结算异常添加结算接口

dev-scheduling
jinna 3 weeks ago
parent 1b71bdbe56
commit 1375f9c374
  1. 31
      src/views/oem/oemOrderSettlement/components/settlementAnomaly.vue

@ -29,7 +29,7 @@
</template> </template>
<script> <script>
import settlementDailog from './SettlementDailog.vue' import settlementDailog from './SettlementDailog.vue'
import {getStatement,oemSettleAccountsItem,matchStandard,updateData} from "@/api/outsourcingManagement/oemOrderSettlement" import {getStatement,calculate,matchStandard,updateData} from "@/api/outsourcingManagement/oemOrderSettlement"
export default { export default {
components: { components: {
@ -381,7 +381,7 @@ export default {
}, },
{ {
label: '结算状态', label: '结算状态',
prop: 'rosStatus', prop: 'rosStatusName',
sortable: true, sortable: true,
filter: true, filter: true,
span: 24, span: 24,
@ -508,6 +508,11 @@ export default {
// return; // return;
// } // }
if(this.data.length == 0){
this.$message.error('请先查询数据!');
return;
}
this.$confirm('确定要进行结算吗?', { this.$confirm('确定要进行结算吗?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -515,22 +520,20 @@ export default {
}).then(() => { }).then(() => {
// //
const params = { const params = {
statementList: this.selectionList, ...this.query,
price: this.form.price price: this.form && this.form.price,
postPlatingStorageTimeStart:this.query && this.query.putStoreTime && this.query.putStoreTime.length != 0 && this.query.putStoreTime[0],
postPlatingStorageTimeEnd:this.query && this.query.putStoreTime && this.query.putStoreTime.length != 0 && this.query.putStoreTime[1],
memo:this.query && this.query.memo && this.query.memo.length != 0 && this.query.memo.join(';'),
}; };
if(params.putStoreTime) delete params.putStoreTime;
oemSettleAccountsItem(params).then(res => { calculate(params).then(res => {
// //
if (res.data && res.data.data) { this.$message.success('结算成功');
this.settleResult = res.data.data; this.onLoad();
// settlementDailog
this.isOpen = true;
} else {
this.$message.success('结算成功');
this.onLoad();
}
}).catch(() => { }).catch(() => {
this.$message.error('结算失败'); // this.$message.error('');
}); });
}).catch(() => { }).catch(() => {
// //

Loading…
Cancel
Save