|
@@ -223,7 +223,6 @@
|
|
|
import { getSchedulingList, getChildren } from '@/api/production'
|
|
|
import SchedulingCheck from '@/views/modules/production/scheduling-check'
|
|
|
import SchedulingPreCheck from '@/views/modules/production/scheduling-pre-check'
|
|
|
- import PurchaseAddOrUpdate from '@/views/modules/sale/purchase-add-or-update'
|
|
|
import SchedulingPurchase from '@/views/modules/production/scheduling-purchase'
|
|
|
import SchedulingCommission from '@/views/modules/production/scheduling-commission'
|
|
|
import CraftsDetail from '@/views/modules/tech/crafts-detail-dialog'
|
|
@@ -238,7 +237,6 @@ export default {
|
|
|
CraftsDetail,
|
|
|
SchedulingCommission,
|
|
|
SchedulingPurchase,
|
|
|
- PurchaseAddOrUpdate,
|
|
|
SchedulingPreCheck,
|
|
|
SchedulingCheck,
|
|
|
Detail,
|
|
@@ -310,10 +308,10 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
multipleSelection: [],
|
|
|
- selectedRows:[],
|
|
|
+ selectedRows: [],
|
|
|
batchIncomeBtnDisabled: false,
|
|
|
batchBtnDisabled: false,
|
|
|
- optionsType: [],
|
|
|
+ optionsType: []
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -494,47 +492,47 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- //监听批量选择的行
|
|
|
- handleSelectionChange(rows){
|
|
|
+ // 监听批量选择的行
|
|
|
+ handleSelectionChange (rows) {
|
|
|
this.selectedRows = rows
|
|
|
|
|
|
- //控制批量操作按钮
|
|
|
+ // 控制批量操作按钮
|
|
|
this.batchIncomeBtnDisabled = false
|
|
|
this.batchBtnDisabled = false
|
|
|
- for(let index=0;index<this.selectedRows.length;index++){
|
|
|
+ for (let index = 0; index < this.selectedRows.length; index++) {
|
|
|
let item = this.selectedRows[index]
|
|
|
- if(Number(item.prodState) === 2){
|
|
|
-
|
|
|
+ if (Number(item.prodState) === 2) {
|
|
|
+
|
|
|
} else {
|
|
|
this.batchIncomeBtnDisabled = true
|
|
|
}
|
|
|
|
|
|
- if(Number(item.prodState) === 2){
|
|
|
-
|
|
|
+ if (Number(item.prodState) === 2) {
|
|
|
+
|
|
|
} else {
|
|
|
this.batchBtnDisabled = true
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- //批量转采购
|
|
|
- batchBuyHandle(){
|
|
|
- if(this.selectedRows.length == 0){
|
|
|
- this.$message.error("请先勾选数据")
|
|
|
- return
|
|
|
+ // 批量转采购
|
|
|
+ batchBuyHandle () {
|
|
|
+ if (this.selectedRows.length === 0) {
|
|
|
+ this.$message.error('请先勾选数据')
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
let list = []
|
|
|
this.selectedRows.forEach(item => {
|
|
|
list.push({
|
|
|
- detailId:Math.round(Math.random() * 1000000),
|
|
|
+ detailId: Math.round(Math.random() * 1000000),
|
|
|
materialName: item.materialName,
|
|
|
- specification:item.productSpec,
|
|
|
+ specification: item.productSpec,
|
|
|
purchaseType: '',
|
|
|
- cnt:item.cnt,
|
|
|
- unitName:'',
|
|
|
- deadline:'',
|
|
|
- batchNumber:item.batchNumber,
|
|
|
- notes:''
|
|
|
+ cnt: item.cnt,
|
|
|
+ unitName: '',
|
|
|
+ deadline: '',
|
|
|
+ batchNumber: item.batchNumber,
|
|
|
+ notes: ''
|
|
|
})
|
|
|
})
|
|
|
|
|
@@ -543,38 +541,38 @@ export default {
|
|
|
this.$refs.addOrUpdate.init(0, null, null, list)
|
|
|
})
|
|
|
},
|
|
|
- //批量转委外
|
|
|
- batchOutsourceHandle(){
|
|
|
- if(this.selectedRows.length == 0){
|
|
|
- this.$message.error("请先勾选数据")
|
|
|
- return
|
|
|
+ // 批量转委外
|
|
|
+ batchOutsourceHandle () {
|
|
|
+ if (this.selectedRows.length === 0) {
|
|
|
+ this.$message.error('请先勾选数据')
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
let list = []
|
|
|
this.selectedRows.forEach(item => {
|
|
|
list.push({
|
|
|
- detailId:Math.round(Math.random() * 1000000),
|
|
|
+ detailId: Math.round(Math.random() * 1000000),
|
|
|
productName: item.productName,
|
|
|
- productNumber:item.productNumber,
|
|
|
+ productNumber: item.productNumber,
|
|
|
productSpec: item.productSpec,
|
|
|
- cnt:item.cnt,
|
|
|
- unitName:'',
|
|
|
- deadline:'',
|
|
|
- batchNumber:item.batchNumber,
|
|
|
- arrivedTime:'',
|
|
|
- qualifiedCnt:'',
|
|
|
- price:'',
|
|
|
- taxPrice:'',
|
|
|
- taxAmount:'',
|
|
|
- taxRateVal:'',
|
|
|
- specificationExplian:'',
|
|
|
- notes:''
|
|
|
+ cnt: item.cnt,
|
|
|
+ unitName: '',
|
|
|
+ deadline: '',
|
|
|
+ batchNumber: item.batchNumber,
|
|
|
+ arrivedTime: '',
|
|
|
+ qualifiedCnt: '',
|
|
|
+ price: '',
|
|
|
+ taxPrice: '',
|
|
|
+ taxAmount: '',
|
|
|
+ taxRateVal: '',
|
|
|
+ specificationExplian: '',
|
|
|
+ notes: ''
|
|
|
})
|
|
|
})
|
|
|
|
|
|
this.addOrUpdateOutsourceVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.addOrUpdateOutsource.init(null,null,null,list)
|
|
|
+ this.$refs.addOrUpdateOutsource.init(null, null, null, list)
|
|
|
})
|
|
|
}
|
|
|
}
|