|
@@ -1420,10 +1420,10 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- capacityNo:null,
|
|
|
- capacityId:null,
|
|
|
- batchCapacityList:[],
|
|
|
- batchCapacityVisible:false,
|
|
|
+ capacityNo: null,
|
|
|
+ capacityId: null,
|
|
|
+ batchCapacityList: [],
|
|
|
+ batchCapacityVisible: false,
|
|
|
isShowSaleLog: false,
|
|
|
optionSaleLog: {
|
|
|
maxHeight: 400,
|
|
@@ -1804,7 +1804,7 @@ export default {
|
|
|
}, 500)
|
|
|
this.getSteelReport = this.debounce(() => {
|
|
|
this.getSteelReportDebounce()
|
|
|
- }, 500)
|
|
|
+ }, 100)
|
|
|
this.getSteelReport()
|
|
|
},
|
|
|
watch: {
|
|
@@ -1855,8 +1855,8 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
window.onresize = () => {
|
|
|
return (() => {
|
|
|
- this.getSteelReport()
|
|
|
this.maxHeight = window.innerHeight - 146
|
|
|
+ this.getSteelReport()
|
|
|
})()
|
|
|
}
|
|
|
})
|
|
@@ -1885,19 +1885,19 @@ export default {
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
- showBatchCapacity(){
|
|
|
- this.capacityNo=null;
|
|
|
- this.capacityId=null;
|
|
|
- this.batchCapacityList=[];
|
|
|
- console.log(this.$refs.tableRef.selection);
|
|
|
+ showBatchCapacity() {
|
|
|
+ this.capacityNo = null
|
|
|
+ this.capacityId = null
|
|
|
+ this.batchCapacityList = []
|
|
|
+ console.log(this.$refs.tableRef.selection)
|
|
|
//按照saleOrderMaterialId查询物资数量
|
|
|
- this.$refs.tableRef.selection.forEach(item1=>{
|
|
|
- item1.size=this.visibleList.filter(item2=>{
|
|
|
- return item1.saleOrderMaterialId==item2.saleOrderMaterialId
|
|
|
- }).length;
|
|
|
- });
|
|
|
- this.batchCapacityList = this.$refs.tableRef.selection;
|
|
|
- console.log(this.batchCapacityList);
|
|
|
+ this.$refs.tableRef.selection.forEach(item1 => {
|
|
|
+ item1.size = this.visibleList.filter(item2 => {
|
|
|
+ return item1.saleOrderMaterialId == item2.saleOrderMaterialId
|
|
|
+ }).length
|
|
|
+ })
|
|
|
+ this.batchCapacityList = this.$refs.tableRef.selection
|
|
|
+ console.log(this.batchCapacityList)
|
|
|
if (this.batchCapacityList.length > 0) {
|
|
|
this.batchCapacityVisible = true
|
|
|
} else {
|
|
@@ -1909,59 +1909,60 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- batchCapacitySelect(selection){
|
|
|
- console.log(selection);
|
|
|
- this.capacityNo=selection.capacityNumber;
|
|
|
- this.capacityId=selection.capacityId;
|
|
|
+ batchCapacitySelect(selection) {
|
|
|
+ console.log(selection)
|
|
|
+ this.capacityNo = selection.capacityNumber
|
|
|
+ this.capacityId = selection.capacityId
|
|
|
},
|
|
|
- batchEditCapacity(){
|
|
|
- if(this.capacityId && this.capacityNo){
|
|
|
- if(!(
|
|
|
- isVehicleNumber(this.capacityNo) ||this.capacityNo == '取消' ||
|
|
|
- this.capacityNo == '待定' || this.capacityNo == '空白'
|
|
|
+ batchEditCapacity() {
|
|
|
+ if (this.capacityId && this.capacityNo) {
|
|
|
+ if (
|
|
|
+ !(
|
|
|
+ isVehicleNumber(this.capacityNo) ||
|
|
|
+ this.capacityNo == '取消' ||
|
|
|
+ this.capacityNo == '待定' ||
|
|
|
+ this.capacityNo == '空白'
|
|
|
)
|
|
|
- ){
|
|
|
- this.$message.error('请输入正确格式的车牌号!')
|
|
|
- return
|
|
|
+ ) {
|
|
|
+ this.$message.error('请输入正确格式的车牌号!')
|
|
|
+ return
|
|
|
}
|
|
|
- this.batchCapacityList.forEach(row=>{
|
|
|
- row.capacityId = this.capacityId;
|
|
|
- row.capacityNumber = this.capacityNo;
|
|
|
- //是否校验GPS
|
|
|
- row.isCheckGPS = this.isCheckGPS;
|
|
|
- row.userId = getCookie('userId')
|
|
|
- if (row.capacityIds != 0) {
|
|
|
- this.axios
|
|
|
- .post('/api/v1/ams/updateCapacityNumberInFactory', row)
|
|
|
- .then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- console.log(res.data)
|
|
|
- } else {
|
|
|
- this.$message.error(res.data.data)
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- if (row.carrierIds == 0) {
|
|
|
- this.$message.error('请先授权承运商!')
|
|
|
- return
|
|
|
- }
|
|
|
- row.lineId = this.lineSpelling[row.size]
|
|
|
- let arr = []
|
|
|
- arr.push(row)
|
|
|
- this.axios
|
|
|
- .post('/api/v1/ams/dispatchSteelOrder', arr)
|
|
|
- .then(res => {
|
|
|
- if (res.data.code == '200') {
|
|
|
- this.$message.success('派车成功!')
|
|
|
- }else{
|
|
|
- this.$message.error(res.data.data)
|
|
|
- }
|
|
|
- })
|
|
|
+ this.batchCapacityList.forEach(row => {
|
|
|
+ row.capacityId = this.capacityId
|
|
|
+ row.capacityNumber = this.capacityNo
|
|
|
+ //是否校验GPS
|
|
|
+ row.isCheckGPS = this.isCheckGPS
|
|
|
+ row.userId = getCookie('userId')
|
|
|
+ if (row.capacityIds != 0) {
|
|
|
+ this.axios
|
|
|
+ .post('/api/v1/ams/updateCapacityNumberInFactory', row)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ console.log(res.data)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.data.data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (row.carrierIds == 0) {
|
|
|
+ this.$message.error('请先授权承运商!')
|
|
|
+ return
|
|
|
}
|
|
|
- });
|
|
|
- this.batchCapacityVisible=false;
|
|
|
+ row.lineId = this.lineSpelling[row.size]
|
|
|
+ let arr = []
|
|
|
+ arr.push(row)
|
|
|
+ this.axios.post('/api/v1/ams/dispatchSteelOrder', arr).then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ this.$message.success('派车成功!')
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.data.data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.batchCapacityVisible = false
|
|
|
this.getSteelReport()
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
|
|
|
}
|
|
|
},
|
|
@@ -3629,7 +3630,7 @@ export default {
|
|
|
})
|
|
|
let map = {
|
|
|
materialId: row.materialId,
|
|
|
- materialNum: row.materialNum
|
|
|
+ materialNum: row.materialNumber
|
|
|
}
|
|
|
let arr = []
|
|
|
arr.push(map)
|