ysy 2 лет назад
Родитель
Сommit
53b198b2e9

+ 1 - 1
src/views/factoryModel/station/components/edit.vue

@@ -137,7 +137,7 @@
     </template>
     </template>
 
 
     <!-- 选择设备 -->
     <!-- 选择设备 -->
-    <ProductModal ref="productRefs" @changeProduct='determineChoose' />
+    <ProductModal ref="productRefs" :isLedger="true" @changeProduct='determineChoose' />
     <ProduceDialog ref="produceRef" @changeProduct="produceConfirm" />
     <ProduceDialog ref="produceRef" @changeProduct="produceConfirm" />
         <!--  自定义编码 -->
         <!--  自定义编码 -->
       <CodeDialog ref="codeRefs" v-if="codeShow" @close="codeShow= false"  @chooseCode="chooseCode"></CodeDialog>
       <CodeDialog ref="codeRefs" v-if="codeShow" @close="codeShow= false"  @chooseCode="chooseCode"></CodeDialog>

+ 79 - 2
src/views/technology/productParam/components/ProductModal.vue

@@ -10,7 +10,7 @@
         </div>
         </div>
         <!-- 表格 -->
         <!-- 表格 -->
         <template v-slot:content>
         <template v-slot:content>
-          <ele-pro-table ref="table" :columns="columns" :datasource="datasource" row-key="id" height="calc(100vh - 350px)"
+          <ele-pro-table ref="table" :columns="isLedger ? columns2 : columns" :datasource="datasource" row-key="id" height="calc(100vh - 350px)"
             class="dict-table" @cell-click="cellClick">
             class="dict-table" @cell-click="cellClick">
             <!-- 表头工具栏 -->
             <!-- 表头工具栏 -->
             <template v-slot:action="{ row }">
             <template v-slot:action="{ row }">
@@ -31,8 +31,15 @@
 import AssetTree from '@/components/AssetTree';
 import AssetTree from '@/components/AssetTree';
 import ProductSearch from './product-search.vue'
 import ProductSearch from './product-search.vue'
 import { getMaterialList } from '@/api/material/list.js';
 import { getMaterialList } from '@/api/material/list.js';
+import { getAssetList } from '@/api/ledgerAssets/index'
 export default {
 export default {
   components: { AssetTree, ProductSearch },
   components: { AssetTree, ProductSearch },
+  props: {
+    isLedger: {
+      type: Boolean,
+      default: false
+    }
+  },
   data() {
   data() {
     return {
     return {
       visible: false,
       visible: false,
@@ -121,6 +128,75 @@ export default {
           label: '选择'
           label: '选择'
         }
         }
       ],
       ],
+
+      columns2: [
+      {
+            columnKey: 'index',
+            type: 'index',
+            label: '序号',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'fixCode',
+            label: '固资编码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+          prop: 'code',
+          label: '编码'
+        },
+        {
+          prop: 'name',
+          label: '名称',
+          showOverflowTooltip: true
+        },
+     
+          {
+            prop: 'codeNumber',
+            label: '编号',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+
+          {
+            prop: 'category.modelType',
+            label: '型号',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'category.specification',
+            label: '规格',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'pathName',
+            label: '位置',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row) => {
+              return _row.position[0].pathName;
+            }
+          },
+          {
+            prop: 'source',
+            label: '生命周期',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+          action: 'action',
+          slot: 'action',
+          align: 'center',
+          label: '选择'
+        }
+      ],
+
       title: null,
       title: null,
       categoryLevelId: null,
       categoryLevelId: null,
       radio: null,
       radio: null,
@@ -136,7 +212,8 @@ export default {
   methods: {
   methods: {
     /* 表格数据源 */
     /* 表格数据源 */
     datasource({ page, where, limit }) {
     datasource({ page, where, limit }) {
-      return getMaterialList({
+      let URL = this.isLedger ? getAssetList : getMaterialList
+      return URL({
         ...where,
         ...where,
         pageNum: page,
         pageNum: page,
         size: limit,
         size: limit,

+ 1 - 1
src/views/technology/production/components/user-edit.vue

@@ -31,7 +31,7 @@
         </el-col>
         </el-col>
 
 
         <el-col :span="8">
         <el-col :span="8">
-          <el-form-item label="控制码:" prop="type">
+          <el-form-item label="工序类型:" prop="type">
             <el-select v-model="form.type" filterable>
             <el-select v-model="form.type" filterable>
               <el-option key="1" label="普通工序" :value="1"> </el-option>
               <el-option key="1" label="普通工序" :value="1"> </el-option>
               <el-option key="2" label="质检工序" :value="2"> </el-option>
               <el-option key="2" label="质检工序" :value="2"> </el-option>