|
@@ -219,14 +219,35 @@
|
|
|
);
|
|
|
// 深拷贝一下参数对象
|
|
|
let param = JSON.parse(JSON.stringify(this.params))
|
|
|
- console.log('深拷贝对象',param);
|
|
|
+ // console.log('深拷贝对象',param);
|
|
|
param.priceApplyItems = list
|
|
|
- const {msg, code} = await SAVE(param);
|
|
|
- if (code === 200) {
|
|
|
- this.onHide();
|
|
|
- this.$emit("success");
|
|
|
- this.$notify.success(msg);
|
|
|
- this.delDemandItemList = []
|
|
|
+ param.priceApplyItems.forEach((item, index) => {
|
|
|
+ item.$index = index
|
|
|
+ });
|
|
|
+ let tishi = param.priceApplyItems.filter(item => {return (item.priceDiffer && item.priceDiffer !== 0)})
|
|
|
+ // console.log('筛选', tishi)
|
|
|
+ let tishiMsg = tishi.map(item => {
|
|
|
+ return `第${item.$index+1}行为价格调整`
|
|
|
+ })
|
|
|
+ // console.log(tishiMsg)
|
|
|
+ if(tishiMsg.length !== 0) {
|
|
|
+ this.$modal.confirm(tishiMsg+ '请核对后再次提交').then(async () =>{
|
|
|
+ const {msg, code} = await SAVE(param);
|
|
|
+ if (code === 200) {
|
|
|
+ this.onHide();
|
|
|
+ this.$emit("success");
|
|
|
+ this.$notify.success(msg);
|
|
|
+ this.delDemandItemList = []
|
|
|
+ }
|
|
|
+ }).catch(() => {});
|
|
|
+ } else {
|
|
|
+ const {msg, code} = await SAVE(param);
|
|
|
+ if (code === 200) {
|
|
|
+ this.onHide();
|
|
|
+ this.$emit("success");
|
|
|
+ this.$notify.success(msg);
|
|
|
+ this.delDemandItemList = []
|
|
|
+ }
|
|
|
}
|
|
|
} catch (err) {
|
|
|
// catch
|