فهرست منبع

Merge remote-tracking branch 'origin/dev' into dev

mazheng 1 سال پیش
والد
کامیت
b736e5552a

BIN
dist.rar


+ 9 - 0
src/api/codeManagement/index.js

@@ -58,3 +58,12 @@ export async function checkCode (code) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 根据根级物品id升级物品编码
+export async function rootCategoryCode (rootCategoryLevelId) {
+  const res = await request.get(`/main/category/copyInfo/${rootCategoryLevelId}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 12 - 24
src/views/material/BOMmanage/components/StepModal1.vue

@@ -97,6 +97,17 @@
         title: '工步选择',
         // 表格列配置
         columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            selectable: (row, index) => {
+              return !this.tableData.some((it) => it.stepId == row.id);
+            },
+            reserveSelection: true,
+            fixed: 'left'
+          },
           {
             label: '序号',
             type: 'index',
@@ -195,30 +206,7 @@
         if (current) {
           this.current = current;
         }
-        if (type === '修改') {
-          this.columns = [
-            {
-              action: 'action',
-              slot: 'action',
-              align: 'center',
-              label: '选择'
-            }
-          ].concat(this.columns);
-        } else {
-          this.columns = [
-            {
-              columnKey: 'selection',
-              type: 'selection',
-              width: 45,
-              align: 'center',
-              selectable: (row, index) => {
-                return !this.tableData.some((it) => it.stepId == row.id);
-              },
-              reserveSelection: true,
-              fixed: 'left'
-            }
-          ].concat(this.columns);
-        }
+
         this.visible = true;
       },
 

+ 10 - 1
src/views/material/BOMmanage/components/attribute.vue

@@ -183,6 +183,10 @@
           </el-form-item>
         </el-col>
       </el-row>
+
+   <div class="btn_box">
+    <el-button type="primary" >修改</el-button>
+   </div>
     </el-form>
   </div>
 </template>
@@ -223,4 +227,9 @@
   };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.btn_box{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}</style>

+ 129 - 26
src/views/material/BOMmanage/components/bomTreeDialog.vue

@@ -68,23 +68,7 @@
             <el-input placeholder="" v-model="attributeData.name"></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="12" label-width="100px">
-          <el-form-item label="型号" prop="modeType">
-            <el-input
-              placeholder=""
-              v-model="attributeData.modeType"
-            ></el-input>
-          </el-form-item>
-        </el-col>
 
-        <el-col :span="12" label-width="100px">
-          <el-form-item label="规格" prop="specification">
-            <el-input
-              placeholder=""
-              v-model="attributeData.specification"
-            ></el-input>
-          </el-form-item>
-        </el-col>
 
         <el-col :span="12" label-width="100px">
           <el-form-item label="材料" prop="materialsName">
@@ -95,15 +79,6 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12" label-width="100px">
-          <el-form-item label="物料编码" prop="materialsCode">
-            <el-input
-              placeholder=""
-              v-model="attributeData.materialsCode"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-
         <el-col :span="12" label-width="100px">
           <el-form-item label="来源" prop="sourceData">
             <el-input
@@ -175,12 +150,117 @@
             ></el-input>
           </el-form-item>
         </el-col>
+
+
       </el-row>
+   
+      <el-row  style="margin-top: 18px;">
+        <el-divider >产品信息</el-divider>
+
+
+        <el-col style="margin-top: 18px;" :span="12" label-width="100px">
+          <el-form-item label="产品:" prop="category.name">
+            <el-input
+              placeholder="请选择产品"
+              @click.native="handleProduct()"
+              v-model="category.name"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <div v-if="category.name">
+        <el-col style="margin-top: 18px;" :span="12" label-width="100px">
+          <el-form-item label="编码:" prop="code">
+             {{ category.code }}
+            </el-form-item>
+          </el-col>
+
+      
+
+          <el-col :span="12" label-width="100px">
+          <el-form-item label="牌号:" prop="brandNum">
+             {{ category.brandNum }}
+            </el-form-item>
+          </el-col>
+
+
+          <el-col :span="12" label-width="100px">
+          <el-form-item label="型号:" prop="modelType">
+             {{ category.modelType }}
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12" label-width="100px">
+          <el-form-item label="规格:" prop="specification">
+             {{ category.specification }}
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12" label-width="100px">
+          <el-form-item label="计量单位:" prop="measuringUnit">
+             {{ category.measuringUnit }}
+            </el-form-item>
+          </el-col>
+
+
+          <el-col :span="12" label-width="100px">
+          <el-form-item label="重量单位:" prop="weightUnit">
+             {{ category.weightUnit }}
+            </el-form-item>
+          </el-col>
+
+
+          
+
+          <el-col :span="12" label-width="100px">
+          <el-form-item label="包装单位:" prop="packingUnit">
+             {{ category.packingUnit }}
+            </el-form-item>
+          </el-col>
+
+
+          <el-col :span="12" label-width="100px">
+          <el-form-item label="毛重:" prop="roughWeight">
+             {{ category.roughWeight }}
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12" label-width="100px">
+          <el-form-item label="净重:" prop="netWeight">
+             {{ category.netWeight }}
+            </el-form-item>
+          </el-col>
+
+
+
+          
+          <el-col :span="12" label-width="100px">
+          <el-form-item label="加工类型:" prop="isConsumable"   v-if="[1, 23, 9, 28].includes(Number(category.categoryLevelPathId))">
+             {{ category.isConsumable == 1 ? '批量' : '单件' }}
+            </el-form-item>
+          </el-col>
+
+      
+
+
+
+        </div>
+
+
+
+      </el-row>
+
     </el-form>
     <div class="btns">
       <el-button type="primary" size="small" @click="save">保存</el-button>
       <el-button size="small" @click="handleClose">关闭</el-button>
     </div>
+
+    <standardOutput
+      ref="standardOutputRefs"
+      @selection="chooseStandardList"
+    ></standardOutput>
+
   </el-dialog>
 </template>
 
@@ -189,10 +269,12 @@
   import selectTree from '@/components/selectTree';
   import producetask from '@/api/technology/production';
   import userSearch from './user-search.vue';
+  import standardOutput from './standardOutput.vue';
   export default {
     components: {
       userSearch,
-      selectTree
+      selectTree,
+      standardOutput,
     },
     data() {
       return {
@@ -202,6 +284,10 @@
         attributeData: {
           versions: ''
         },
+
+        category: {
+          name: ''
+        },
         bomTreeList: [],
         statusOptions: [
           {
@@ -227,6 +313,8 @@
     },
 
     methods: {
+
+
       getTreeValue(data) {
         this.attributeData.parentId = data.id;
         this.attributeData.level = +data.level + 1;
@@ -235,7 +323,9 @@
         if (!this.attributeData.parentId) {
           this.attributeData.parentId = 0;
           this.attributeData.level = 1;
+        
         }
+        this.attributeData.category = this.category
         saveBomTreeList(this.attributeData).then((res) => {
           if (res.code == '0') {
             this.$message.success('保存成功');
@@ -248,6 +338,19 @@
         this.attributeData.versions = versions;
         this.$forceUpdate();
       },
+
+      handleProduct() {
+        this.$refs.standardOutputRefs.open(9);
+      },
+      chooseStandardList(type, data) {
+        if (type == 9) {
+
+           this.category = data[0];
+           this.$forceUpdate()
+
+        }
+      },
+
       async open(type, versions, categoryId) {
         this.attributeData = {};
         this.attributeData.bomType = type;

+ 1 - 116
src/views/material/BOMmanage/components/workingProcedure.vue

@@ -158,122 +158,7 @@
           </ele-pro-table>
         </el-tab-pane>
         <el-tab-pane label="质检参数" name="质检参数">
-          <ele-pro-table
-            ref="qualityTable"
-            :datasource="datasource"
-            :immediate="true"
-            :need-page="false"
-            :columns="columns"
-          >
-            <!-- 表头工具栏 -->
-            <template v-if="!isView" v-slot:toolbar>
-              <el-button
-                size="small"
-                icon="el-icon-plus"
-                class="ele-btn-icon"
-                type="primary"
-                @click.native="openParam('质检')"
-                >添加参数</el-button
-              >
-            </template>
-
-            <template v-slot:sort="{ row }">
-              <div v-if="isView">{{ row.sort }}</div>
-              <el-input v-else v-model="row.sort"></el-input>
-            </template>
-
-            <!-- 默认值 -->
-            <template v-slot:defaultValue="{ row }">
-              <div v-if="isView">
-                {{ row.defaultValue }}
-              </div>
-              <div v-else>
-                <el-input
-                  v-if="
-                    row.textType == 1 ||
-                    row.textType == 4 ||
-                    row.textType == 3 ||
-                    row.textType == 5
-                  "
-                  v-model="row.defaultValue"
-                  placeholder="请输入"
-                ></el-input>
-                <el-select
-                  v-if="row.textType == 2"
-                  v-model="row.defaultValue"
-                  placeholder="请选择"
-                >
-                  <el-option label="TRUE" :value="'TRUE'" />
-                  <el-option label="FALSE" :value="'FALSE'" />
-                </el-select>
-              </div>
-            </template>
-
-            <!-- 上限 -->
-            <template v-slot:maxValue="{ row }">
-              <div v-if="isView">
-                {{ row.maxValue }}
-              </div>
-              <div v-else>
-                <el-input
-                  v-if="row.textType == 3"
-                  v-model="row.maxValue"
-                  placeholder="请输入"
-                ></el-input>
-              </div>
-            </template>
-            <!-- 下限 -->
-            <template v-slot:minValue="{ row }">
-              <div v-if="isView">
-                {{ row.minValue }}
-              </div>
-              <div v-else>
-                <el-input
-                  v-if="row.textType == 3"
-                  v-model="row.minValue"
-                  placeholder="请输入"
-                ></el-input>
-              </div>
-            </template>
-
-            <!-- 单位 -->
-            <template v-slot:unitName="{ row }">
-              <div v-if="isView">
-                {{ row.unitName }}
-              </div>
-              <div v-else>
-                <DictSelection
-                  v-if="row.textType != 2 && row.textType != 5"
-                  dictName="工艺参数单位"
-                  clearable
-                  filterable
-                  v-model="row.unitName"
-                >
-                </DictSelection>
-
-                <span v-if="row.textType == 5"> h(小时)</span>
-              </div>
-            </template>
-
-            <!-- 操作列 -->
-            <template v-slot:action="{ row }">
-              <el-popconfirm
-                class="ele-action"
-                title="确定要删除当前参数吗?"
-                @confirm="remove(row, '工艺')"
-              >
-                <template v-slot:reference>
-                  <el-link
-                    type="danger"
-                    :underline="false"
-                    icon="el-icon-delete"
-                  >
-                    删除
-                  </el-link>
-                </template>
-              </el-popconfirm>
-            </template>
-          </ele-pro-table>
+   
         </el-tab-pane>
         <el-tab-pane label="生产节拍" name="生产节拍">
           <el-form label-width="100px" ref="form" :model="beatParam">

+ 15 - 1
src/views/material/product/detail.vue

@@ -235,7 +235,7 @@
   import linkMsg from './components/link-msg.vue';
   import { getDetails } from '@/api/classifyManage/itemInformation';
 
-  import { getCode } from '@/api/codeManagement';
+  import { getCode ,rootCategoryCode } from '@/api/codeManagement';
 
   import { addMaterial } from '@/api/material/list.js';
   import { deepClone } from '@/utils/index';
@@ -347,6 +347,7 @@
       async _getDetails() {
         const data = await getDetails(this.$route.query.id);
         const info = deepClone(data);
+        console.log(123, info);
         this.form = {
           ...info.category
         };
@@ -355,6 +356,15 @@
         this.judgeSet(info);
         this.searchDeptNodeClick(this.form.chargeDeptId);
 
+
+        
+        if (this.status == 1) {
+            rootCategoryCode(this.categoryLevelPathId).then((res) => {
+              this.$set(this.form, 'code', res);
+            });
+          }
+
+
         this.$forceUpdate()
       },
       // 判断字段类型并赋值
@@ -429,6 +439,10 @@
             const code = await getCode(ruleCode);
             this.$set(this.form, 'code', code);
           }
+
+
+    
+
         }
 
         this.$forceUpdate();

+ 3 - 1
src/views/system/organization/components/org-user-edit.vue

@@ -21,7 +21,7 @@
           </el-form-item>
 
           <el-form-item label="所属工厂:">
-            <el-select style="width: 100%" clearable v-model="form.factoryId"   filterable placeholder="请选择所属工厂">
+            <el-select style="width: 100%" clearable v-model="form.factoryId" multiple  filterable placeholder="请选择所属工厂">
               <el-option
                 v-for="item in factoryList"
                 :label="item.name"
@@ -329,6 +329,8 @@ export default {
           getUserDetail(this.data.id).then((res) => {
             this.form = {...res};
 
+            
+
             // this.deptTree = []
             // this.form.deptIds = []
             // if (this.form.deptTree) {