|
@@ -46,7 +46,7 @@
|
|
|
销售单号:
|
|
|
<a-input placeholder="请输入销售单号" v-model.trim="form.salesBillNo" :maxLength="50" @change="fetchUser" @blur="handleBlur"/>
|
|
|
<span class="mleft">{{ buyerName }}</span>
|
|
|
- <a-button type="primary" @click="handleSave('salesBillNo')" class="button-error">设置完成</a-button>
|
|
|
+ <a-button type="primary" :disabled="!salesBillFlag" @click="handleSave('salesBillNo')" class="button-error errorBtn">设置完成</a-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<a-divider>请给以下产品设置新的退货单价</a-divider>
|
|
@@ -154,6 +154,21 @@ export default {
|
|
|
return item.productEntity.code.indexOf(this.queryParam.productCode) >= 0 &&
|
|
|
item.productEntity.name.indexOf(this.queryParam.productName) >= 0
|
|
|
})
|
|
|
+ let arr = ret.map(con=>{return con.salesReturnDetailSn})
|
|
|
+ if(arr &&arr.length>0){
|
|
|
+ if(this.salesBillSnList && this.salesBillSnList.length>0){
|
|
|
+ this.salesBillSnList.forEach(item=>{
|
|
|
+ let pot = arr.indexOf(item.salesReturnDetailSn)
|
|
|
+ if(pot!=-1){
|
|
|
+ if(item.price ||item.price==0){
|
|
|
+ ret[pot].price = item.price
|
|
|
+ }
|
|
|
+ ret[pot].priceRemark = '抓单('+this.form.salesBillNo+')'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
res({
|
|
|
list: ret,
|
|
|
count: ret.length
|
|
@@ -164,7 +179,8 @@ export default {
|
|
|
openGrabOrderModal: false,
|
|
|
listInfo: null,
|
|
|
noShowBillSnList: null,
|
|
|
- salesBillSnList: []
|
|
|
+ salesBillSnList: [],
|
|
|
+ salesBillFlag:false //抓单按钮
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -194,18 +210,21 @@ export default {
|
|
|
productList: productArr
|
|
|
}
|
|
|
grabSalesBill(objInfo).then(res => {
|
|
|
- const newList = res.data
|
|
|
- const _this = this
|
|
|
- if (newList && newList.length > 0) {
|
|
|
- const flag = newList.some(item => Object.keys(item).length > 2)
|
|
|
- if (flag) {
|
|
|
- this.listInfo = newList.filter(con => Object.keys(con).length > 2)
|
|
|
- this.openGrabOrderModal = true
|
|
|
- const noShowList = newList.filter(con => Object.keys(con).length <= 2)
|
|
|
- this.noShowBillSnList = _this.getNewSalesBillList(noShowList)
|
|
|
- } else {
|
|
|
- const resultVal = _this.getNewSalesBillList(newList)
|
|
|
- this.salesBillSnList = resultVal
|
|
|
+ if(res.status == 200){
|
|
|
+ const newList = res.data
|
|
|
+ const _this = this
|
|
|
+ _this.salesBillFlag = true
|
|
|
+ if (newList && newList.length > 0) {
|
|
|
+ const flag = newList.some(item => Object.keys(item).length > 2)
|
|
|
+ if (flag) {
|
|
|
+ this.listInfo = newList.filter(con => Object.keys(con).length > 2)
|
|
|
+ this.openGrabOrderModal =this.isShow?true:false
|
|
|
+ const noShowList = newList.filter(con => Object.keys(con).length <= 2)
|
|
|
+ this.noShowBillSnList = _this.getNewSalesBillList(noShowList)
|
|
|
+ } else {
|
|
|
+ const resultVal = _this.getNewSalesBillList(newList)
|
|
|
+ this.salesBillSnList = resultVal
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -232,6 +251,7 @@ export default {
|
|
|
} else {
|
|
|
this.salesBillSnList = con
|
|
|
}
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
},
|
|
|
closeGrabOrder () {
|
|
|
this.listInfo = null
|
|
@@ -294,6 +314,7 @@ export default {
|
|
|
},
|
|
|
// 取消
|
|
|
handleCommonCancel () {
|
|
|
+ this.salesBillFlag=false
|
|
|
this.$emit('cancel')
|
|
|
},
|
|
|
// 查询
|
|
@@ -354,6 +375,11 @@ export default {
|
|
|
.redBg-row{
|
|
|
background-color: #f5beb4;
|
|
|
}
|
|
|
+ .errorBtn[disabled]{
|
|
|
+ background: #ff6666;
|
|
|
+ outline: none;
|
|
|
+ color:rgba(255,255,255,.5);
|
|
|
+ }
|
|
|
.orgBg-row{
|
|
|
background-color: #fffca2;
|
|
|
}
|