|
@@ -7,7 +7,7 @@
|
|
|
:before-close="handleClose"
|
|
:before-close="handleClose"
|
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
:close-on-press-escape="false"
|
|
|
- width="1200px"
|
|
|
|
|
|
|
+ width="1280px"
|
|
|
>
|
|
>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
<el-row>
|
|
<el-row>
|
|
@@ -21,6 +21,7 @@
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="名称:" prop="name">
|
|
<el-form-item label="名称:" prop="name">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -52,11 +53,7 @@
|
|
|
></DictSelection>
|
|
></DictSelection>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <!-- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="质检工具:" prop="inspectionTool">
|
|
|
|
|
- <el-input v-model="form.inspectionTool"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
|
|
+
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="计划来源:" prop="planSource">
|
|
<el-form-item label="计划来源:" prop="planSource">
|
|
|
<el-select
|
|
<el-select
|
|
@@ -94,46 +91,7 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <!-- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="批号:" prop="batchNo">
|
|
|
|
|
- <el-input v-model="form.batchNo" disabled />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
- <!-- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="产品名称:" prop="productName">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="form.productName"
|
|
|
|
|
- readonly=""
|
|
|
|
|
- @click.native="addProduct"
|
|
|
|
|
- :disabled="type == 'detail'||type == 'issued'"
|
|
|
|
|
-
|
|
|
|
|
- />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
- <!-- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="产品编码:" prop="productCode">
|
|
|
|
|
- <el-input v-model="form.productCode" disabled />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="产品规格:" prop="specification">
|
|
|
|
|
- <el-input v-model="form.specification" disabled />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="产品牌号:" prop="brandNo">
|
|
|
|
|
- <el-input v-model="form.brandNo" disabled />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="数量:" prop="productNumber">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="form.productNumber"
|
|
|
|
|
- :disabled="type == 'detail'||type == 'issued'"
|
|
|
|
|
|
|
|
|
|
- />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="执行部门"
|
|
label="执行部门"
|
|
@@ -200,7 +158,7 @@
|
|
|
></el-date-picker>
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
|
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="附件:" prop="accessory">
|
|
<el-form-item label="附件:" prop="accessory">
|
|
|
<fileUpload
|
|
<fileUpload
|
|
|
v-model="form.accessory"
|
|
v-model="form.accessory"
|
|
@@ -219,7 +177,7 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="名称" align="center" prop="productName">
|
|
<el-table-column label="名称" align="center" prop="productName">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<el-table-column label="规格" align="center" prop="specification">
|
|
<el-table-column label="规格" align="center" prop="specification">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="牌号" align="center" prop="brandNo">
|
|
<el-table-column label="牌号" align="center" prop="brandNo">
|
|
@@ -232,6 +190,29 @@
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="工艺路线"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ prop="produceRoutingId"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="scope.row.produceRoutingId"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ v-for="item in routeL"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.name"
|
|
|
|
|
+ :value="item.name"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="操作"
|
|
label="操作"
|
|
|
align="center"
|
|
align="center"
|
|
@@ -287,257 +268,287 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { save, update, planIssued } from '@/api/inspectionPlan';
|
|
|
|
|
-import EquipmentDialog from '../../../views/inspectionWork/components/EquipmentDialog';
|
|
|
|
|
-import productionPlan from './productionPlan';
|
|
|
|
|
-import workOrder from './workOrder';
|
|
|
|
|
-import produceOrder from './produceOrder';
|
|
|
|
|
-import warehousing from './warehousing';
|
|
|
|
|
-import { getUserPage } from '@/api/system/organization';
|
|
|
|
|
-import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
|
|
-import fileUpload from '@/components/upload/fileUpload';
|
|
|
|
|
|
|
+ import { save, update, planIssued } from '@/api/inspectionPlan';
|
|
|
|
|
+ import { routeList } from '@/api/aps/index';
|
|
|
|
|
+ import EquipmentDialog from '../../../views/inspectionWork/components/EquipmentDialog';
|
|
|
|
|
+ import productionPlan from './productionPlan';
|
|
|
|
|
+ import workOrder from './workOrder';
|
|
|
|
|
+ import produceOrder from './produceOrder';
|
|
|
|
|
+ import warehousing from './warehousing';
|
|
|
|
|
+ import { getUserPage } from '@/api/system/organization';
|
|
|
|
|
+ import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
|
|
+ import fileUpload from '@/components/upload/fileUpload';
|
|
|
|
|
|
|
|
-export default {
|
|
|
|
|
- components: {
|
|
|
|
|
- EquipmentDialog,
|
|
|
|
|
- deptSelect,
|
|
|
|
|
- productionPlan,
|
|
|
|
|
- workOrder,
|
|
|
|
|
- produceOrder,
|
|
|
|
|
- fileUpload,
|
|
|
|
|
- warehousing
|
|
|
|
|
- },
|
|
|
|
|
- data() {
|
|
|
|
|
- const defaultForm = function () {
|
|
|
|
|
- return {
|
|
|
|
|
- id: '',
|
|
|
|
|
- code: '',
|
|
|
|
|
- planSourceId: '',
|
|
|
|
|
- planSourceCode: '',
|
|
|
|
|
- name: '',
|
|
|
|
|
- autoOrder: 0,
|
|
|
|
|
- duration: '',
|
|
|
|
|
- status: '',
|
|
|
|
|
- approvalUserId: '',
|
|
|
|
|
- executeId: '',
|
|
|
|
|
- groupId: '',
|
|
|
|
|
- groupName: '',
|
|
|
|
|
- planStartTime: '',
|
|
|
|
|
- planEndTime: '',
|
|
|
|
|
- accessory: [],
|
|
|
|
|
- // productCode: '',
|
|
|
|
|
- // productName: '',
|
|
|
|
|
- // specification: '',
|
|
|
|
|
- // brandNo: '',
|
|
|
|
|
- // productNumber: '',
|
|
|
|
|
- executeName: '',
|
|
|
|
|
- planSource: '',
|
|
|
|
|
- batchNo: '',
|
|
|
|
|
- productList: [],
|
|
|
|
|
- qualityMode: ''
|
|
|
|
|
- };
|
|
|
|
|
- };
|
|
|
|
|
- return {
|
|
|
|
|
- defaultForm,
|
|
|
|
|
- // 表单数据
|
|
|
|
|
- form: { ...defaultForm() },
|
|
|
|
|
- sourceList: [],
|
|
|
|
|
- // 表单验证规则
|
|
|
|
|
- rules: {
|
|
|
|
|
- name: [{ required: true, message: '请输入', trigger: 'blur' }]
|
|
|
|
|
- // productName: [{ required: true, message: '请选择', trigger: 'blur' }]
|
|
|
|
|
- },
|
|
|
|
|
- visible: false,
|
|
|
|
|
- type: null,
|
|
|
|
|
- title: null,
|
|
|
|
|
- loading: false,
|
|
|
|
|
- listPage: [],
|
|
|
|
|
- executorList: []
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- watch: {
|
|
|
|
|
- 'form.type'(val) {
|
|
|
|
|
- this.sourceList =
|
|
|
|
|
- val == 1
|
|
|
|
|
- ? [{ label: '采购收货单', value: '1' }]
|
|
|
|
|
- : val == 2
|
|
|
|
|
- ? [
|
|
|
|
|
- { label: '生产计划', value: '2' },
|
|
|
|
|
- { label: '生产订单', value: '3' },
|
|
|
|
|
- { label: '生产工单', value: '4' }
|
|
|
|
|
- ]
|
|
|
|
|
- : [];
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- created() {},
|
|
|
|
|
- methods: {
|
|
|
|
|
- open(type, row) {
|
|
|
|
|
- this.title =
|
|
|
|
|
- type == 'add'
|
|
|
|
|
- ? '新增'
|
|
|
|
|
- : type == 'edit'
|
|
|
|
|
- ? '编辑'
|
|
|
|
|
- : type == 'issued'
|
|
|
|
|
- ? '下发'
|
|
|
|
|
- : '详情';
|
|
|
|
|
- this.type = type;
|
|
|
|
|
- if (this.type != 'add') {
|
|
|
|
|
- row.accessory = row.accessory || [];
|
|
|
|
|
- this.form = JSON.parse(JSON.stringify(row));
|
|
|
|
|
- if (this.form.groupId) {
|
|
|
|
|
- this.getUserList({ groupId: this.form.groupId });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- this.visible = true;
|
|
|
|
|
- },
|
|
|
|
|
- planChange(value) {
|
|
|
|
|
- this.form.planSource = '';
|
|
|
|
|
- this.choose({});
|
|
|
|
|
|
|
+ export default {
|
|
|
|
|
+ components: {
|
|
|
|
|
+ EquipmentDialog,
|
|
|
|
|
+ deptSelect,
|
|
|
|
|
+ productionPlan,
|
|
|
|
|
+ workOrder,
|
|
|
|
|
+ produceOrder,
|
|
|
|
|
+ fileUpload,
|
|
|
|
|
+ warehousing
|
|
|
},
|
|
},
|
|
|
|
|
+ data() {
|
|
|
|
|
+ const defaultForm = function () {
|
|
|
|
|
+ return {
|
|
|
|
|
+ id: '',
|
|
|
|
|
+ code: '',
|
|
|
|
|
+ planSourceId: '',
|
|
|
|
|
+ planSourceCode: '',
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ autoOrder: 0,
|
|
|
|
|
+ duration: '',
|
|
|
|
|
+ status: '',
|
|
|
|
|
+ approvalUserId: '',
|
|
|
|
|
+ executeId: '',
|
|
|
|
|
+ groupId: '',
|
|
|
|
|
+ groupName: '',
|
|
|
|
|
+ planStartTime: '',
|
|
|
|
|
+ planEndTime: '',
|
|
|
|
|
+ accessory: [],
|
|
|
|
|
+ // productCode: '',
|
|
|
|
|
+ // productName: '',
|
|
|
|
|
+ // specification: '',
|
|
|
|
|
+ // brandNo: '',
|
|
|
|
|
+ // productNumber: '',
|
|
|
|
|
+ executeName: '',
|
|
|
|
|
+ planSource: '',
|
|
|
|
|
+ batchNo: '',
|
|
|
|
|
+ productList: [],
|
|
|
|
|
+ qualityMode: '',
|
|
|
|
|
|
|
|
- planSourceChange() {
|
|
|
|
|
- this.choose({});
|
|
|
|
|
- if (this.form.planSource) {
|
|
|
|
|
- this.addProduct();
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- handleDeleteItem(index) {
|
|
|
|
|
- this.form.productList.splice(index, 1);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ };
|
|
|
|
|
+ };
|
|
|
|
|
+ return {
|
|
|
|
|
+ defaultForm,
|
|
|
|
|
+ // 表单数据
|
|
|
|
|
+ form: { ...defaultForm() },
|
|
|
|
|
+ sourceList: [],
|
|
|
|
|
+ // 表单验证规则
|
|
|
|
|
+ rules: {
|
|
|
|
|
+ name: [{ required: true, message: '请输入', trigger: 'blur' }]
|
|
|
|
|
+ // productName: [{ required: true, message: '请选择', trigger: 'blur' }]
|
|
|
|
|
+ },
|
|
|
|
|
+ visible: false,
|
|
|
|
|
+ type: null,
|
|
|
|
|
+ title: null,
|
|
|
|
|
+ loading: false,
|
|
|
|
|
+ listPage: [],
|
|
|
|
|
+ executorList: [],
|
|
|
|
|
+
|
|
|
|
|
+ routeL: []
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
- addProduct() {
|
|
|
|
|
- if (this.form.planSource == 1) {
|
|
|
|
|
- this.$refs.warehousingRef.open();
|
|
|
|
|
- } else if (this.form.planSource == 2) {
|
|
|
|
|
- this.$refs.productionPlanRef.open();
|
|
|
|
|
- } else if (this.form.planSource == 3) {
|
|
|
|
|
- this.$refs.workOrderRef.open();
|
|
|
|
|
- } else if (this.form.planSource == 4) {
|
|
|
|
|
- this.$refs.produceOrderRef.open();
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$refs.equipmentRefs.open();
|
|
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ 'form.type'(val) {
|
|
|
|
|
+ this.sourceList =
|
|
|
|
|
+ val == 1
|
|
|
|
|
+ ? [{ label: '采购收货单', value: '1' }]
|
|
|
|
|
+ : val == 2
|
|
|
|
|
+ ? [
|
|
|
|
|
+ { label: '生产计划', value: '2' },
|
|
|
|
|
+ { label: '生产订单', value: '3' },
|
|
|
|
|
+ { label: '生产工单', value: '4' }
|
|
|
|
|
+ ]
|
|
|
|
|
+ : [];
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- /* 保存编辑 */
|
|
|
|
|
- save() {
|
|
|
|
|
- this.$refs.form.validate((valid) => {
|
|
|
|
|
- if (!valid) {
|
|
|
|
|
- return false;
|
|
|
|
|
|
|
+ created() {},
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ open(type, row) {
|
|
|
|
|
+ this.title =
|
|
|
|
|
+ type == 'add'
|
|
|
|
|
+ ? '新增'
|
|
|
|
|
+ : type == 'edit'
|
|
|
|
|
+ ? '编辑'
|
|
|
|
|
+ : type == 'issued'
|
|
|
|
|
+ ? '下发'
|
|
|
|
|
+ : '详情';
|
|
|
|
|
+ this.type = type;
|
|
|
|
|
+ if (this.type != 'add') {
|
|
|
|
|
+ row.accessory = row.accessory || [];
|
|
|
|
|
+ this.form = JSON.parse(JSON.stringify(row));
|
|
|
|
|
+ if (this.form.groupId) {
|
|
|
|
|
+ this.getUserList({ groupId: this.form.groupId });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- if (this.form.productList.length == 0) {
|
|
|
|
|
- this.$message.error('请选择产品!');
|
|
|
|
|
|
|
+ this.visible = true;
|
|
|
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ this.getRouteList();
|
|
|
|
|
+ },
|
|
|
|
|
+ planChange(value) {
|
|
|
|
|
+ this.form.planSource = '';
|
|
|
|
|
+ this.choose({});
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ planSourceChange() {
|
|
|
|
|
+ this.choose({});
|
|
|
|
|
+ if (this.form.planSource) {
|
|
|
|
|
+ this.addProduct();
|
|
|
}
|
|
}
|
|
|
- this.loading = true;
|
|
|
|
|
- if (this.type == 'add') {
|
|
|
|
|
- delete this.form.id;
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ handleDeleteItem(index) {
|
|
|
|
|
+ this.form.productList.splice(index, 1);
|
|
|
|
|
+ },
|
|
|
|
|
+ addProduct() {
|
|
|
|
|
+ if (this.form.planSource == 1) {
|
|
|
|
|
+ this.$refs.warehousingRef.open();
|
|
|
|
|
+ } else if (this.form.planSource == 2) {
|
|
|
|
|
+ this.$refs.productionPlanRef.open();
|
|
|
|
|
+ } else if (this.form.planSource == 3) {
|
|
|
|
|
+ this.$refs.workOrderRef.open();
|
|
|
|
|
+ } else if (this.form.planSource == 4) {
|
|
|
|
|
+ this.$refs.produceOrderRef.open();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$refs.equipmentRefs.open();
|
|
|
}
|
|
}
|
|
|
- console.log(this.type);
|
|
|
|
|
- let URL =
|
|
|
|
|
- this.type == 'add' ? save : this.type == 'edit' ? update : planIssued;
|
|
|
|
|
- URL(this.form)
|
|
|
|
|
- .then((msg) => {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- this.$message.success(msg);
|
|
|
|
|
- this.handleClose();
|
|
|
|
|
- this.$emit('done');
|
|
|
|
|
- })
|
|
|
|
|
- .catch((e) => {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- choose(data) {
|
|
|
|
|
- if (Array.isArray(data)) {
|
|
|
|
|
- this.form.productList=[]
|
|
|
|
|
- data.forEach((item) => {
|
|
|
|
|
- this.form.productList.push({
|
|
|
|
|
- productCode: item.code,
|
|
|
|
|
- productName: item.name,
|
|
|
|
|
- specification: item.specification,
|
|
|
|
|
- brandNo: item.brandNum,
|
|
|
|
|
- productNumber: ''
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ /* 保存编辑 */
|
|
|
|
|
+ save() {
|
|
|
|
|
+ this.$refs.form.validate((valid) => {
|
|
|
|
|
+ if (!valid) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.form.productList.length == 0) {
|
|
|
|
|
+ this.$message.error('请选择产品!');
|
|
|
|
|
+
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ let isBol = this.form.productList.every((e, i) => e.productNumber && e.produceRoutingId)
|
|
|
|
|
+ if(!isBol) {
|
|
|
|
|
+ this.$message.error('请完善数据');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ this.loading = true;
|
|
|
|
|
+ if (this.type == 'add') {
|
|
|
|
|
+ delete this.form.id;
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.type);
|
|
|
|
|
+ let URL =
|
|
|
|
|
+ this.type == 'add'
|
|
|
|
|
+ ? save
|
|
|
|
|
+ : this.type == 'edit'
|
|
|
|
|
+ ? update
|
|
|
|
|
+ : planIssued;
|
|
|
|
|
+ URL(this.form)
|
|
|
|
|
+ .then((msg) => {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ this.$message.success(msg);
|
|
|
|
|
+ this.handleClose();
|
|
|
|
|
+ this.$emit('done');
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((e) => {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- this.form.productList=data.productList
|
|
|
|
|
- this.form.planSourceId = data.id;
|
|
|
|
|
- this.form.planSourceCode = data.code;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ choose(data) {
|
|
|
|
|
+ if (Array.isArray(data)) {
|
|
|
|
|
+ this.form.productList = [];
|
|
|
|
|
+ data.forEach((item) => {
|
|
|
|
|
+ this.form.productList.push({
|
|
|
|
|
+ productCode: item.code,
|
|
|
|
|
+ productName: item.name,
|
|
|
|
|
+ specification: item.specification,
|
|
|
|
|
+ brandNo: item.brandNum,
|
|
|
|
|
+ productNumber: ''
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.form.productList = data.productList;
|
|
|
|
|
+ this.form.planSourceId = data.id;
|
|
|
|
|
+ this.form.planSourceCode = data.code;
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- //选择部门(搜索)
|
|
|
|
|
- searchDeptNodeClick(info, row) {
|
|
|
|
|
- if (info) {
|
|
|
|
|
- const params = { groupId: info };
|
|
|
|
|
- this.getUserList(params);
|
|
|
|
|
- this.form.groupName = row.name;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.form.executeGroupId = null;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- // 获取审核人列表、巡点检人员
|
|
|
|
|
- async getUserList(params) {
|
|
|
|
|
- try {
|
|
|
|
|
- let data = { pageNum: 1, size: -1 };
|
|
|
|
|
- // 如果传了参数就是获取巡点检人员数据
|
|
|
|
|
- if (params) {
|
|
|
|
|
- data = Object.assign(data, params);
|
|
|
|
|
|
|
+ //选择部门(搜索)
|
|
|
|
|
+ searchDeptNodeClick(info, row) {
|
|
|
|
|
+ if (info) {
|
|
|
|
|
+ const params = { groupId: info };
|
|
|
|
|
+ this.getUserList(params);
|
|
|
|
|
+ this.form.groupName = row.name;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.executeGroupId = null;
|
|
|
}
|
|
}
|
|
|
- const res = await getUserPage(data);
|
|
|
|
|
- this.executorList = res.list;
|
|
|
|
|
- } catch (error) {}
|
|
|
|
|
- },
|
|
|
|
|
- // 执行人选择
|
|
|
|
|
- changeExecutor(val) {
|
|
|
|
|
- if (val) {
|
|
|
|
|
- this.form.executeId = val;
|
|
|
|
|
- this.form.executeName = this.executorList.filter(
|
|
|
|
|
- (item) => item.id === val
|
|
|
|
|
- )[0].name;
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取审核人列表、巡点检人员
|
|
|
|
|
+ async getUserList(params) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ let data = { pageNum: 1, size: -1 };
|
|
|
|
|
+ // 如果传了参数就是获取巡点检人员数据
|
|
|
|
|
+ if (params) {
|
|
|
|
|
+ data = Object.assign(data, params);
|
|
|
|
|
+ }
|
|
|
|
|
+ const res = await getUserPage(data);
|
|
|
|
|
+ this.executorList = res.list;
|
|
|
|
|
+ } catch (error) {}
|
|
|
|
|
+ },
|
|
|
|
|
+ // 执行人选择
|
|
|
|
|
+ changeExecutor(val) {
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ this.form.executeId = val;
|
|
|
|
|
+ this.form.executeName = this.executorList.filter(
|
|
|
|
|
+ (item) => item.id === val
|
|
|
|
|
+ )[0].name;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ restForm() {
|
|
|
|
|
+ this.form = { ...this.defaultForm() };
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.form.clearValidate();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ handleClose() {
|
|
|
|
|
+ this.restForm();
|
|
|
|
|
+ this.visible = false;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ getRouteList() {
|
|
|
|
|
+ let params = { pageNum: 1, size: -1, status: 1, routeType: 3 };
|
|
|
|
|
+ routeList(params).then((res) => {
|
|
|
|
|
+ this.routeL = res.list || [];
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
- restForm() {
|
|
|
|
|
- this.form = { ...this.defaultForm() };
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$refs.form.clearValidate();
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- handleClose() {
|
|
|
|
|
- this.restForm();
|
|
|
|
|
- this.visible = false;
|
|
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ };
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-.location-warp {
|
|
|
|
|
- display: flex;
|
|
|
|
|
|
|
+ .location-warp {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
|
|
|
- .detail {
|
|
|
|
|
- margin-left: 10px;
|
|
|
|
|
|
|
+ .detail {
|
|
|
|
|
+ margin-left: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ :deep(.el-form-item__content .el-input-group__prepend) {
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ :deep(
|
|
|
|
|
+ .el-dialog:not(.ele-dialog-form)
|
|
|
|
|
+ .el-dialog__body
|
|
|
|
|
+ .el-form
|
|
|
|
|
+ .el-form-item:last-child
|
|
|
|
|
+ ) {
|
|
|
|
|
+ margin-bottom: 22px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-product {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ font-size: 30px;
|
|
|
|
|
+ color: #1890ff;
|
|
|
|
|
+ margin: 10px 0;
|
|
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
-:deep(.el-form-item__content .el-input-group__prepend) {
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
-}
|
|
|
|
|
-:deep(
|
|
|
|
|
- .el-dialog:not(.ele-dialog-form)
|
|
|
|
|
- .el-dialog__body
|
|
|
|
|
- .el-form
|
|
|
|
|
- .el-form-item:last-child
|
|
|
|
|
- ) {
|
|
|
|
|
- margin-bottom: 22px;
|
|
|
|
|
-}
|
|
|
|
|
-.add-product {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: flex-end;
|
|
|
|
|
- font-size: 30px;
|
|
|
|
|
- color: #1890ff;
|
|
|
|
|
- margin: 10px 0;
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
-}
|
|
|
|
|
</style>
|
|
</style>
|