Browse Source

修改台账列表

huang_an 2 năm trước cách đây
mục cha
commit
6b5cf3f2ed

+ 1 - 0
src/components/CommomSelect/factory-area-select.vue

@@ -77,6 +77,7 @@
         if (this.augr == 0) {
           delete params.type;
           const res = await factoryworkstation(params);
+          console.log('res-------', res);
           this.dictList = res.list;
           return;
         }

+ 101 - 61
src/views/ledgerAssets/equipment/edit.vue

@@ -160,7 +160,7 @@
           </div>
           <el-descriptions
             title=""
-            :column="4"
+            :column="5"
             size="medium"
             border
             style="edit"
@@ -239,6 +239,38 @@
                 ></el-input>
               </el-form-item>
             </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 入账日期 </template>
+              <el-form-item label-width="0">
+                <el-date-picker
+                  style="width: 100%"
+                  v-model="zcInfo.entryDate"
+                  type="date"
+                  placeholder="选择入账日期"
+                  value-format="yyyy-MM-dd"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-descriptions-item>
+
+            <el-descriptions-item>
+              <template slot="label"> 周期 </template>
+              <el-form-item label-width="0">
+                <el-select
+                  style="width: 100%"
+                  v-model="zcInfo.cycle"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in options.deliveryCycle"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-descriptions-item>
           </el-descriptions>
           <el-descriptions
             title=""
@@ -252,7 +284,7 @@
             <el-descriptions-item>
               <template slot="label"> 权属人 </template>
               <el-form-item label-width="0">
-                <el-select
+                <!-- <el-select
                   style="width: 100%"
                   v-model="zcInfo.ownershipUserId"
                   placeholder="请选择"
@@ -264,24 +296,58 @@
                     :value="item.id"
                   >
                   </el-option>
-                </el-select>
+                </el-select> -->
+                <el-input
+                  v-model="form.workstation.leaderName"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
               </el-form-item>
             </el-descriptions-item>
             <el-descriptions-item>
               <template slot="label"> 权属部门 </template>
               <el-form-item label-width="0">
                 <div class="input">
-                  <DeptSelect
+                  <!-- <DeptSelect
                     v-model="zcInfo.ownershipGroupId"
                     @input="getqsbm"
-                  />
+                  /> -->
+                  <el-input
+                    v-model="form.workstation.groupName"
+                    disabled
+                    placeholder="请输入内容"
+                  ></el-input>
                 </div>
               </el-form-item>
             </el-descriptions-item>
             <el-descriptions-item :span="3">
               <template slot="label"> 所属厂房 </template>
               <el-form-item label-width="0">
-                <FactoryAreaSelect
+                <el-input
+                  style="margin-right: 10px; width: 20%"
+                  v-model="form.workstation.workshopPlanName"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
+                <el-input
+                  style="margin-right: 10px; width: 20%"
+                  v-model="form.workstation.workshopName"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
+                <el-input
+                  style="margin-right: 10px; width: 20%"
+                  v-model="form.workstation.productionLineName"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
+                <el-input
+                  style="margin-right: 10px; width: 20%"
+                  v-model="form.workstation.name"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
+                <!-- <FactoryAreaSelect
                   placeholder="请选择工厂"
                   style="margin-right: 10px; width: 20%"
                   v-model="zcInfo.factoryRoomId1"
@@ -293,14 +359,14 @@
                   v-model="zcInfo.factoryRoomId2"
                   :augr="2"
                   @returnItem="returnItem1"
-                />
+                /> -->
                 <!-- <FactoryAreaSelect
                   placeholder="请选择车间"
                   style="margin-right: 10px; width: 20%"
                   v-model="zcInfo.factoryRoomId3"
                   :augr="3"
                 /> -->
-                <el-select
+                <!-- <el-select
                   style="width: 19%; margin-right: 10px"
                   v-model="zcInfo.factoryRoomId3"
                   placeholder="请选择"
@@ -313,14 +379,14 @@
                     :value="item.id"
                   >
                   </el-option>
-                </el-select>
+                </el-select> -->
                 <!-- <FactoryAreaSelect
                   style="margin-right: 10px; width: 20%"
                   placeholder="请选择产线"
                   v-model="zcInfo.factoryRoomId4"
                   :augr="4"
                 /> -->
-                <el-select
+                <!-- <el-select
                   style="width: 19%; margin-right: 10px"
                   v-model="zcInfo.factoryRoomId4"
                   placeholder="请选择"
@@ -338,15 +404,20 @@
                   placeholder="请输入工位"
                   v-model="zcInfo.factoryRoomId5"
                   @returnItem="returnItem"
-                />
+                /> -->
               </el-form-item>
             </el-descriptions-item>
             <el-descriptions-item>
               <template slot="label"> 所属工序 </template>
               <el-form-item label-width="0">
-                <WorkingProcedureSelect
+                <!-- <WorkingProcedureSelect
                   v-model="zcInfo.roteId"
-                ></WorkingProcedureSelect>
+                ></WorkingProcedureSelect> -->
+                <el-input
+                  v-model="form.workstation.taskNames"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
               </el-form-item>
             </el-descriptions-item>
             <el-descriptions-item>
@@ -448,38 +519,6 @@
                 </div>
               </el-form-item>
             </el-descriptions-item>
-            <el-descriptions-item>
-              <template slot="label"> 入账日期 </template>
-              <el-form-item label-width="0">
-                <el-date-picker
-                  style="width: 100%"
-                  v-model="zcInfo.entryDate"
-                  type="date"
-                  placeholder="选择入账日期"
-                  value-format="yyyy-MM-dd"
-                >
-                </el-date-picker>
-              </el-form-item>
-            </el-descriptions-item>
-
-            <el-descriptions-item>
-              <template slot="label"> 周期 </template>
-              <el-form-item label-width="0">
-                <el-select
-                  style="width: 100%"
-                  v-model="zcInfo.cycle"
-                  placeholder="请选择"
-                >
-                  <el-option
-                    v-for="item in options.deliveryCycle"
-                    :key="item.id"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-descriptions-item>
           </el-descriptions>
           <el-descriptions
             title=""
@@ -1019,7 +1058,8 @@
           // 基本信息
           code: '',
           name: '',
-          productTime: ''
+          productTime: '',
+          workstation: {}
         },
         rules: {
           name: [
@@ -1274,6 +1314,7 @@
         this.zcInfo.factoryRoomId4 = '';
         this.zcInfo.factoryRoomId5 = '';
         const data = await listFactoryLine([e]);
+        console.log('生产线---------', data);
         this.cxList = data;
       },
       async returnItem1(item) {
@@ -1281,26 +1322,28 @@
         this.zcInfo.factoryRoomId4 = '';
         this.zcInfo.factoryRoomId5 = '';
         const data = await listWorkshopByParentId(item.id);
-
+        console.log('厂房-------------', data);
         this.zjList = data;
       },
       async returnItem(item) {
         const data = await factoryworkstation(item.id);
-        console.log(data);
+        console.log('工位------', data);
         if (data.workshopId) {
           await this.returnItem1({ id: data.workshopId });
         }
         if (data.productionLineId) {
           await this.getCxList(data.productionLineId);
         }
-        this.zcInfo.factoryRoomId1 = data.factoryId;
-        this.zcInfo.factoryRoomName1 = data.factoryName;
-        this.zcInfo.factoryRoomId2 = data.workshopPlanId;
-        this.zcInfo.factoryRoomName2 = data.workshopPlanName;
-        this.zcInfo.factoryRoomId3 = data.workshopId;
-        this.zcInfo.factoryRoomName3 = data.workshopName;
-        this.zcInfo.factoryRoomId4 = data.productionLineId;
-        this.zcInfo.factoryRoomName4 = data.productionLineName;
+        // this.zcInfo.factoryRoomId1 = data.factoryId;
+        // this.zcInfo.factoryRoomName1 = data.factoryName;
+        // this.zcInfo.factoryRoomId2 = data.workshopPlanId;
+        // this.zcInfo.factoryRoomName2 = data.workshopPlanName;
+        // this.zcInfo.factoryRoomId3 = data.workshopId;
+        // this.zcInfo.factoryRoomName3 = data.workshopName;
+        // this.zcInfo.factoryRoomId4 = data.productionLineId;
+        // this.zcInfo.factoryRoomName4 = data.productionLineName;
+        this.zcInfo.factoryRoomId5 = data.id;
+        this.zcInfo.factoryRoomName5 = data.name;
 
         this.zcInfo.roteId = data.taskList[0].id;
         this.zcInfo.roteName = data.taskList[0].name;
@@ -1636,14 +1679,15 @@
       // 获取设备详情
       async getInfo() {
         const data = await getAssetInfo(this.id);
+        console.log('获取设备详情-----', data);
         this.auditorDeptClick(data.postId);
         for (const key of Object.keys(this.zcInfo)) {
           this.zcInfo[key] = data[key];
         }
+        console.log(this.zcInfo);
         data.extInfoSelf = data.extInfoSelf || [];
         this.form = data;
         this.form.location = data.deviceLocationName.split(',');
-
         this.basicInfo = data.category;
         this.assetInfo = data.category.category;
         this.cbexpirationTime = data.expirationTime;
@@ -1653,13 +1697,9 @@
         if (data.factoryRoomId) {
           const pathIds = data.factoryRoomId.split(',');
           this.zcInfo.factoryRoomId1 = pathIds[0];
-
           this.zcInfo.factoryRoomId2 = pathIds[1];
-
           this.zcInfo.factoryRoomId3 = pathIds[2];
-
           this.zcInfo.factoryRoomId4 = pathIds[3];
-
           this.zcInfo.factoryRoomId5 = pathIds[4];
           if (this.zcInfo.factoryRoomId2) {
             this.returnItem1({ id: pathIds[1] });