Commit 811efd0b authored by chenzj's avatar chenzj

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-ui into dev

parents 9c6f3244 131d906f
...@@ -484,8 +484,31 @@ export default { ...@@ -484,8 +484,31 @@ export default {
console.log(response, 'response') console.log(response, 'response')
if (response.code === 200) { if (response.code === 200) {
const valueList = response.data.map((item) => { const valueList = response.data.map((item) => {
const obj = {}
if(item.standardSize) {
const arr = item.standardSize.split('|')
if(arr && arr.length > 0){
arr.forEach((item1, index) => {
let [size, jh] = item1.split(":")
let zl, loss
if (jh) {
[zl, loss] = jh.split("+")
if(loss) {
jh = (Number(zl) + Number(loss)) + ''
} else {
jh = zl
}
}
obj['size' + (index + 1)] = size
obj['zl' + (index + 1)] = zl
obj['loss' + (index + 1)] = loss
obj['jh' + (index + 1)] = jh
})
}
}
return { return {
packagePrint: item, packagePrint: item,
standardSizeobj: obj
} }
}) })
postBatchPrintPdf( postBatchPrintPdf(
......
...@@ -177,8 +177,14 @@ export default { ...@@ -177,8 +177,14 @@ export default {
} }
}) })
console.log(params) console.log(params)
await workorderProofMakeProduction(params) workorderProofMakeProduction(params).then(res => {
this.$emit('close') if (res.code === 200) {
this.$emit('close')
return true
} else {
this.$message.warning(res.msg)
}
})
} }
}) })
}, },
......
...@@ -125,22 +125,22 @@ ...@@ -125,22 +125,22 @@
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple" @click="handleCombination" <el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple || combinationDisable" @click="handleCombination"
v-hasPermi="['pro:combination:add']">订单组合 v-hasPermi="['pro:combination:add']">订单组合
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-edit" size="mini" @click="()=>handleCombination('del')" <el-button type="warning" plain icon="el-icon-edit" size="mini" @click="()=>handleCombination('del')" :disabled="combinationDisable"
>取消组合 >取消组合
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple" @click="handleArrange" <el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple || combinationDisable" @click="handleArrange"
v-hasPermi="['mes:pro:workorder:dofinish']">生产编排 v-hasPermi="['mes:pro:workorder:dofinish']">生产编排
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-edit" size="mini" @click="()=>handleArrange('del')" <el-button type="warning" plain icon="el-icon-edit" size="mini" @click="()=>handleArrange('del')" :disabled="combinationDisable"
>取消编排 >取消编排
</el-button> </el-button>
</el-col> </el-col>
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="single" @click="handleCommandClick" <el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="single" @click="handleCommandClick"
v-hasPermi="['mes:pro:workorder:dofinish']">生产打样下达 v-hasPermi="['mes:pro:workorder:dofinish']">手工工单下达
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.2"> <el-col :span="1.2">
...@@ -186,13 +186,13 @@ ...@@ -186,13 +186,13 @@
></right-toolbar> --> ></right-toolbar> -->
</el-row> </el-row>
<!-- 生产打样下达 --> <!-- 手工工单下达 -->
<el-dialog title="打样下达填报" :visible.sync="commandVisible" width="1200px" append-to-body> <el-dialog title="打样下达填报" :visible.sync="commandVisible" width="1200px" append-to-body>
<CommandList v-if="commandVisible" ref="CommandListRef" :currentData="currentData" @close="commandVisible = false" <CommandList v-if="commandVisible" ref="CommandListRef" :currentData="currentData" @close="commandVisible = false"
:workorderId="currentData.workorderId"></CommandList> :workorderId="currentData.workorderId"></CommandList>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="commandVisible = false">取 消</el-button> <el-button @click="commandVisible = false">取 消</el-button>
<el-button type="primary" @click="$refs.CommandListRef.submit(), getList()">确 定</el-button> <el-button type="primary" @click="confirmCommand">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -653,6 +653,7 @@ export default { ...@@ -653,6 +653,7 @@ export default {
console.log('clickMounted') console.log('clickMounted')
}, },
}, },
combinationDisable: false,
combinationCodes: [], combinationCodes: [],
arrangeOpen: false, arrangeOpen: false,
enablePrint: false, enablePrint: false,
...@@ -797,11 +798,7 @@ export default { ...@@ -797,11 +798,7 @@ export default {
}, },
handleCommandClick() { handleCommandClick() {
this.currentData = this.selectedRows[0] this.currentData = this.selectedRows[0]
if (this.selectedRows[0].workorderType == 'prototype' && this.selectedRows[0].status === "PUBLISHED") { this.commandVisible = true
this.commandVisible = true
} else {
this.$message.warning('请选择工单类型为打样工单、状态为已发布的数据')
}
}, },
handleViewRecord(row) { handleViewRecord(row) {
this.currentData = row this.currentData = row
...@@ -1140,6 +1137,13 @@ export default { ...@@ -1140,6 +1137,13 @@ export default {
// }); // });
}, },
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.dict.type.mes_workorder_type
this.combinationDisable = false
selection.forEach(item => {
if (['complements', 'prototype'].indexOf(item.workorderType) > -1) {
this.combinationDisable = true
}
})
// this.selectedRows = val; // this.selectedRows = val;
this.selectedRows = selection; this.selectedRows = selection;
this.ids = selection.map(item => item.workorderId) this.ids = selection.map(item => item.workorderId)
...@@ -1291,6 +1295,11 @@ export default { ...@@ -1291,6 +1295,11 @@ export default {
`workorder_${new Date().getTime()}.xlsx` `workorder_${new Date().getTime()}.xlsx`
); );
}, },
confirmCommand(){
if (this.$refs.CommandListRef.submit()) {
this.getList()
}
},
handleConfirm() { handleConfirm() {
let that = this; let that = this;
this.$modal this.$modal
......
...@@ -254,7 +254,6 @@ ...@@ -254,7 +254,6 @@
<el-input <el-input
v-model="form.remark" v-model="form.remark"
type="textarea" type="textarea"
:disabled="mode == 'make'"
placeholder="请输入内容" placeholder="请输入内容"
/> />
</el-form-item> </el-form-item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment