结算异常添加结算接口

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

@ -29,7 +29,7 @@
</template>
<script>
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 {
components: {
@ -381,7 +381,7 @@ export default {
},
{
label: '结算状态',
prop: 'rosStatus',
prop: 'rosStatusName',
sortable: true,
filter: true,
span: 24,
@ -508,6 +508,11 @@ export default {
// return;
// }
if(this.data.length == 0){
this.$message.error('请先查询数据!');
return;
}
this.$confirm('确定要进行结算吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -515,22 +520,20 @@ export default {
}).then(() => {
//
const params = {
statementList: this.selectionList,
price: this.form.price
...this.query,
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.settleResult = res.data.data;
// settlementDailog
this.isOpen = true;
} else {
this.$message.success('结算成功');
this.onLoad();
}
this.$message.success('结算成功');
this.onLoad();
}).catch(() => {
this.$message.error('结算失败');
// this.$message.error('');
});
}).catch(() => {
//

Loading…
Cancel
Save