|
|
@@ -78,6 +78,12 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="工序" prop="taskId">
|
|
|
+ <el-input placeholder="请选择" @click.native="openTask" readonly v-model="form.taskName"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<ele-pro-table ref="table" :columns="columns" :datasource="tableData" height="calc(100vh - 550px)" :need-page="false">
|
|
|
@@ -114,6 +120,19 @@
|
|
|
|
|
|
<ProductModal ref="productRefs" @changeProduct='determineChoose' />
|
|
|
|
|
|
+ <!-- 添加工序 -->
|
|
|
+
|
|
|
+ <ele-modal width="1720px" :visible="addDialog" :append-to-body="true" :close-on-click-modal="true"
|
|
|
+ @update:visible="closeAdd">
|
|
|
+ <Production :tableData="productionList" ref="ProductionCom" :isRadio="true" />
|
|
|
+ <template v-slot:footer>
|
|
|
+ <el-button @click="closeAdd">取消</el-button>
|
|
|
+ <el-button type="primary" @click="addParamrter">
|
|
|
+ 添加
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </ele-modal>
|
|
|
+
|
|
|
</ele-modal>
|
|
|
</template>
|
|
|
|
|
|
@@ -124,8 +143,9 @@ import factorySelect from '@/components/CommomSelect/factory-select.vue';
|
|
|
import { getCode } from '@/api/codeManagement/index.js';
|
|
|
import { getVersionCode, bomSave, bomUpdate, getById, detailPage } from '@/api/material/BOM';
|
|
|
import { pageList } from '@/api/technology/version/version.js';
|
|
|
+import Production from '@/views/technology/route/components/production/index.vue'
|
|
|
export default {
|
|
|
- components: { ProductModal, factorySelect },
|
|
|
+ components: { ProductModal, factorySelect, Production },
|
|
|
props: {
|
|
|
statusOpt: Object
|
|
|
},
|
|
|
@@ -158,6 +178,7 @@ export default {
|
|
|
baseCount: '',
|
|
|
baseCountUnit: '',
|
|
|
status: '-1',
|
|
|
+ taskId: ''
|
|
|
|
|
|
},
|
|
|
removeSubBomIdList: [],
|
|
|
@@ -179,6 +200,10 @@ export default {
|
|
|
],
|
|
|
tableData: [],
|
|
|
versionList: [],
|
|
|
+
|
|
|
+ productionList: [],
|
|
|
+ addDialog: false,
|
|
|
+
|
|
|
columns: [
|
|
|
{
|
|
|
type: 'index',
|
|
|
@@ -238,6 +263,9 @@ export default {
|
|
|
|
|
|
baseCount: [
|
|
|
{ validator: baseCountVa, trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ taskId: [
|
|
|
+ { required: true, message: '请选择工序', trigger: 'blur' }
|
|
|
]
|
|
|
},
|
|
|
|
|
|
@@ -294,7 +322,7 @@ export default {
|
|
|
},
|
|
|
selectProd() {
|
|
|
this.$refs.productRefs.open(this.form, '选择产品', '9')
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
|
|
|
|
|
|
@@ -308,7 +336,7 @@ export default {
|
|
|
this.$set(this.form, 'categoryId', row.id)
|
|
|
this.$set(this.form, 'categoryCode', row.code)
|
|
|
this.getVersion()
|
|
|
-
|
|
|
+
|
|
|
|
|
|
}
|
|
|
else if (title == '选择物料') {
|
|
|
@@ -389,10 +417,32 @@ export default {
|
|
|
async _getById(id) {
|
|
|
const data = await getById(id);
|
|
|
this.form = data;
|
|
|
+ this.productionList = [ { id: this.form.taskId, name: this.form.taskName }]
|
|
|
this.form.status = this.form.status + ''
|
|
|
},
|
|
|
|
|
|
|
|
|
+ openTask() {
|
|
|
+ this.addDialog = true
|
|
|
+ },
|
|
|
+
|
|
|
+ /*关闭选择参数*/
|
|
|
+ closeAdd() {
|
|
|
+ // this.$refs.ProductionCom.$refs.table.setSelectedRows([]);
|
|
|
+ this.addDialog = false;
|
|
|
+ },
|
|
|
+
|
|
|
+ addParamrter() {
|
|
|
+ let arr = this.$refs.ProductionCom.getRowData();
|
|
|
+ this.productionList = [ arr ]
|
|
|
+ this.form['taskId'] = arr.id
|
|
|
+ this.form['taskName'] = arr.name
|
|
|
+ this.addDialog = false;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|