Browse Source

解决相关BUG

huang_an 2 years ago
parent
commit
04809eeb76

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

@@ -75,3 +75,12 @@ export async function contactlink(params) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 获取委外单列表
+export async function getOutsourcedOrdersList(params) {
+  const res = await request.get(`/mes/applyoutsource/page`, { params });
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 9 - 0
src/api/warehouseManagement/outin.js

@@ -123,6 +123,15 @@ export default {
       return res.data.data;
     }
   },
+  outApproveQuality: async (params) => {
+    const res = await request.post(
+      `/bpm/outinApprove/qualityInspection`,
+      params
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
   outApprove: async (params) => {
     const res = await request.post(`/bpm/outApprove/submit`, params);
     if (res.data.code == 0) {

+ 8 - 5
src/utils/dict/warehouse.js

@@ -35,14 +35,15 @@ export const sceneState = [
   { code: 1, label: '生产入库', documentsName: '生产工单' },
   { code: 2, label: '采购入库', documentsName: '采购收货单' },
   { code: 3, label: '归还入库', documentsName: '出库单' },
-  { code: 4, label: '领料退货入库' },
+  { code: 4, label: '领料退货入库', documentsName: '领料退货单' },
   // { code: 5, label: '其他入库' },
   { code: 6, label: '销售退货入库', documentsName: '销售订单' },
   { code: 7, label: '销售受托入库', documentsName: '受托收货单' },
   { code: 8, label: '半成品入库', documentsName: '委外工单' },
-  { code: 9, label: '外协入库' },
-  { code: 10, label: '委外入库' },
-  { code: 11, label: '委外退货入库' },
+  { code: 9, label: '外协入库', documentsName: '销售退货处理单' },
+  { code: 10, label: '委外入库', documentsName: '委外订单' },
+  { code: 11, label: '委外退货入库', documentsName: '委外发货单' },
+  { code: 12, label: '委外入库(非采购)', documentsName: '委外申请单' },
   { code: 99, label: '其他入库' }
 ];
 export const outputSceneState = [
@@ -53,7 +54,9 @@ export const outputSceneState = [
   { code: 5, label: '报废出库' },
   { code: 6, label: '外协出库' },
   { code: 7, label: '委外出库' },
-  { code: 8, label: '受托退货出库' }
+  { code: 8, label: '受托退货出库' },
+  { code: 9, label: '仓库委外出库' },
+  { code: 10, label: '采购退货出库' }
 ];
 // 紧急状态
 export const emergencyState = [

+ 81 - 10
src/views/warehouseManagement/components/AssetsDialog.vue

@@ -44,7 +44,7 @@
             ></el-input>
           </el-form-item>
         </el-col> -->
-        <el-col :span="5">
+        <el-col :span="6">
           <el-form-item label="列表维度:" prop="dimension">
             <template>
               <el-select
@@ -61,7 +61,7 @@
             </template>
           </el-form-item>
         </el-col>
-        <el-col :span="5">
+        <el-col :span="6">
           <el-form-item label="物品编码:">
             <el-input
               type="text"
@@ -75,11 +75,11 @@
             <el-input
               type="text"
               placeholder="搜索物品名称"
-              v-model="searchForm.name"
+              v-model="searchForm.assetName"
             ></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="5">
+        <el-col :span="6">
           <el-form-item label="批次号:">
             <el-input
               type="text"
@@ -88,7 +88,42 @@
             ></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="4" style="text-align: right">
+        <el-col :span="6">
+          <el-form-item label="刻码">
+            <el-input
+              type="text"
+              placeholder="搜索物品刻码"
+              v-model="searchForm.engrave"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="发货码">
+            <el-input
+              type="text"
+              placeholder="搜索发货码"
+              v-model="searchForm.barcodes"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col v-if="dimension != 2" :span="6">
+          <el-form-item label="质检结果">
+            <el-select
+              clearable
+              v-model="searchForm.qualityStatus"
+              placeholder="请选择质检结果"
+            >
+              <el-option
+                v-for="item in qualityStatusOption"
+                :label="item.label"
+                :value="item.value"
+                :key="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col style="text-align: right">
           <el-button type="primary" @click="doSearch">搜索</el-button>
           <el-button icon="el-icon-refresh-left" @click="reset">重置</el-button>
         </el-col>
@@ -243,14 +278,24 @@
             min-width="120"
             :show-overflow-tooltip="true"
           ></el-table-column>
-          <el-table-column prop="weightUnit" label="质检状态" min-width="120">
+          <el-table-column
+            v-if="dimension != 2"
+            prop="weightUnit"
+            label="质检状态"
+            min-width="120"
+          >
             <template slot-scope="{ row }">
               <span v-if="row.qualityStatus == 0">未质检</span>
               <span v-else-if="row.qualityStatus == 1">已质检</span>
               <span v-else>-</span>
             </template>
           </el-table-column>
-          <el-table-column prop="weightUnit" label="质检结果" min-width="120">
+          <el-table-column
+            v-if="dimension != 2"
+            prop="weightUnit"
+            label="质检结果"
+            min-width="120"
+          >
             <template slot-scope="{ row }">
               <span v-if="row.qualityResult == 0">合格</span>
               <span v-else-if="row.qualityResult == 1">不合格</span>
@@ -319,6 +364,26 @@
 
     data() {
       return {
+        qualityResultOption: [
+          {
+            value: 0,
+            label: '合格'
+          },
+          {
+            value: 1,
+            label: '不合格'
+          }
+        ],
+        qualityStatusOption: [
+          {
+            value: 1,
+            label: '已质检'
+          },
+          {
+            value: 0,
+            label: '未质检'
+          }
+        ],
         visible: false,
         tableData: [],
         total: 0,
@@ -328,8 +393,11 @@
         },
         searchForm: {
           code: '',
-          name: '',
-          batchNo: ''
+          assetName: '',
+          batchNo: '',
+          engrave: '',
+          barcodes: '',
+          qualityStatus: ''
         },
         selectionList: [],
         materialType: '',
@@ -534,8 +602,11 @@
       },
       reset() {
         this.searchForm.code = '';
-        this.searchForm.name = '';
+        this.searchForm.assetName = '';
         this.searchForm.batchNo = '';
+        this.searchForm.engrave = '';
+        this.searchForm.barcodes = '';
+        this.searchForm.qualityStatus = '';
         this.doSearch();
       },
       doSearch() {

+ 30 - 1
src/views/warehouseManagement/stockLedger/components/item-search.vue

@@ -178,6 +178,24 @@
             ></el-input>
           </el-form-item>
         </el-col>
+        <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+          <el-form-item label="质检状态:" prop="qualityStatus">
+            <el-select
+              style="width: 100%"
+              clearable
+              v-model="params.qualityStatus"
+              placeholder="请选择质检结果"
+            >
+              <el-option
+                v-for="item in qualityStatusOption"
+                :label="item.label"
+                :value="item.value"
+                :key="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
         <el-col
           v-if="dimension == 3 || dimension == 4"
           v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }"
@@ -243,11 +261,22 @@
         specification: '',
         code: '',
         categoryCode: '',
-        assetName: ''
+        assetName: '',
+        qualityStatus: ''
       };
       return {
         // 表单数据
         params: { ...defaultParams },
+        qualityStatusOption: [
+          {
+            value: 1,
+            label: '已质检'
+          },
+          {
+            value: 0,
+            label: '未质检'
+          }
+        ],
         warehouseList: [],
         dimension: '1'
       };

+ 91 - 9
src/views/warehouseManagement/stockManagement/add.vue

@@ -99,6 +99,23 @@
               </el-select> </el-form-item
           ></el-col>
           <el-col :span="8">
+            <el-form-item
+              v-if="formData.bizType == 12"
+              label="委外申请单"
+              prop="documentSource"
+            >
+              <el-input
+                placeholder="请输入"
+                v-model="formData.extInfo.documentSource"
+                @click.native="handleOutsourcedOrders()"
+              >
+                <el-button
+                  slot="append"
+                  icon="el-icon-circle-close"
+                  @click.stop="onClear"
+                ></el-button>
+              </el-input>
+            </el-form-item>
             <el-form-item
               v-if="formData.bizType == 2"
               label="采购收货单"
@@ -126,11 +143,23 @@
                 clearable
                 v-model="formData.extInfo.documentSource"
             /></el-form-item>
+            <el-form-item
+              v-if="formData.bizType == 10"
+              label="委外订单"
+              prop="documentSource"
+            >
+              <el-input
+                placeholder="请输入"
+                clearable
+                v-model="formData.extInfo.documentSource"
+            /></el-form-item>
             <el-form-item
               v-if="
                 formData.bizType != 1 &&
                 formData.bizType != 2 &&
-                formData.bizType != 3
+                formData.bizType != 3 &&
+                formData.bizType != 10 &&
+                formData.bizType != 12
               "
               label="销售订单"
               prop="documentSource"
@@ -1238,12 +1267,18 @@
 
     <!-- 销售订单 -->
     <picker ref="pickerRef" @success="pickerSuccess" />
+    <!-- 委外订单 -->
+    <outsourcedOrders
+      ref="outsourcedOrdersRef"
+      @success="outsourcedOrdersSuccess"
+    />
   </div>
 </template>
 
 <script>
   import { add, bignumber } from 'mathjs';
   import picker from './components/picker.vue';
+  import outsourcedOrders from './components/outsourcedOrders.vue';
   import outin from '@/api/warehouseManagement/outin';
   import {
     getTreeByPid,
@@ -1279,7 +1314,8 @@
       WareHouseDailog,
       upload,
       ReturnSelect,
-      picker
+      picker,
+      outsourcedOrders
     },
     data() {
       return {
@@ -1299,6 +1335,7 @@
         resultArray: [],
         contactList: [],
         pickerRow: {},
+        outsourcedOrdersRow: {},
         fromUserList: [],
         codeList: [],
         materialType,
@@ -1431,11 +1468,17 @@
           this.$refs[key + index].blur();
           if (key === keyfield[keyfield.length - 1]) {
             // 当前行最后一个,跳转下一行第一个
+            if (this.$refs[keyfield[0] + (index + 1)].value == 0) {
+              this.$refs[keyfield[0] + (index + 1)].value = '';
+            }
             this.$refs[keyfield[0] + (index + 1)].focus();
           } else {
             // 跳转下一个
             const nextkeyindex = keyfield.findIndex((k) => k === key) + 1;
             this.$nextTick(() => {
+              if (this.$refs[keyfield[nextkeyindex] + index].value == 0) {
+                this.$refs[keyfield[nextkeyindex] + index].value = '';
+              }
               this.$refs[keyfield[nextkeyindex] + index].focus();
             });
           }
@@ -1451,6 +1494,9 @@
           }
           this.$refs[key + index].blur();
           this.$nextTick(() => {
+            if (this.$refs[key + (index - 1)].value == 0) {
+              this.$refs[key + (index - 1)].value = '';
+            }
             this.$refs[key + (index - 1)].focus();
           });
         }
@@ -1465,6 +1511,9 @@
           }
           this.$refs[key + index].blur();
           this.$nextTick(() => {
+            if (this.$refs[key + (index + 1)].value == 0) {
+              this.$refs[key + (index + 1)].value = '';
+            }
             this.$refs[key + (index + 1)].focus();
           });
         }
@@ -1479,12 +1528,21 @@
           }
           this.$refs[key + index].blur();
           if (key === keyfield[0]) {
+            if (
+              this.$refs[keyfield[keyfield.length - 1] + (index - 1)].value == 0
+            ) {
+              this.$refs[keyfield[keyfield.length - 1] + (index - 1)].value =
+                '';
+            }
             // 当前行第一个,跳转上一行最后一个
             this.$refs[keyfield[keyfield.length - 1] + (index - 1)].focus();
           } else {
             // 跳转上一个
             const prevkeyindex = keyfield.findIndex((k) => k === key) - 1;
             this.$nextTick(() => {
+              if (this.$refs[keyfield[prevkeyindex] + index].value == 0) {
+                this.$refs[keyfield[prevkeyindex] + index].value = '';
+              }
               this.$refs[keyfield[prevkeyindex] + index].focus();
             });
           }
@@ -1504,11 +1562,17 @@
           this.$refs[key + index].blur();
           if (key === keyfield[keyfield.length - 1]) {
             // 当前行最后一个,跳转下一行第一个
+            if (this.$refs[keyfield[0] + (index + 1)].value == 0) {
+              this.$refs[keyfield[0] + (index + 1)].value = '';
+            }
             this.$refs[keyfield[0] + (index + 1)].focus();
           } else {
             // 跳转下一个
             const nextkeyindex = keyfield.findIndex((k) => k === key) + 1;
             this.$nextTick(() => {
+              if (this.$refs[keyfield[nextkeyindex] + index].value == 0) {
+                this.$refs[keyfield[nextkeyindex] + index].value = '';
+              }
               this.$refs[keyfield[nextkeyindex] + index].focus();
             });
           }
@@ -1856,6 +1920,10 @@
         const data = await contactlink({ contactId: id });
         this.contactList = data.data;
       },
+      outsourcedOrdersSuccess(row) {
+        this.outsourcedOrdersRow = row;
+        this.formData.extInfo.documentSource = row.code;
+      },
       async pickerSuccess(row) {
         this.pickerRow = row;
         this.formData.extInfo.documentSource = row.orderNo;
@@ -1911,12 +1979,16 @@
       onClear() {
         this.formData.extInfo.documentSource = '';
         this.pickerRow = {};
+        this.outsourcedOrdersRow = {};
         this.formData.clientName = '';
         this.formData.clientCode = '';
         this.formData.extInfo.supplierName = '';
         this.formData.extInfo.supplierId = '';
         this.$forceUpdate();
       },
+      handleOutsourcedOrders() {
+        this.$refs.outsourcedOrdersRef.open();
+      },
       handlePicker() {
         this.$refs.pickerRef.open();
       },
@@ -2340,12 +2412,14 @@
                   this.$set(i, 'minPackingCount ', item.minPackingCount);
                   this.$set(i, 'measuringUnit', item.measuringUnit);
                   this.$set(i, 'isPack', false);
-                  if (this.formData.extInfo.assetType == 1) {
-                    this.$set(i, 'status', '0');
-                  } else {
-                    this.$set(i, 'result', '0');
-                    this.$set(i, 'status', '1');
-                  }
+                  this.$set(i, 'result', '0');
+                  this.$set(i, 'status', '1');
+                  // if (this.formData.extInfo.assetType == 1) {
+                  //   this.$set(i, 'status', '0');
+                  // } else {
+                  //   this.$set(i, 'result', '0');
+                  //   this.$set(i, 'status', '1');
+                  // }
 
                   if (!item.isUnpack) {
                     if (index < item.warehouseLedgerDetails.length - 1) {
@@ -2543,9 +2617,17 @@
             console.log('=====>', obj);
             this.saveLoading = true;
             try {
+              if (obj.bizType == '12') {
+                obj.storageSource = 1;
+              }
               const res = await outin.save(obj);
               if (res.code == 0) {
-                await outin.outApproves({ outInId: res.data[0] });
+                // 委外入库(非采购)
+                if (obj.bizType == '12') {
+                  await outin.outApproveQuality({ outInId: res.data[0] });
+                } else {
+                  await outin.outApproves({ outInId: res.data[0] });
+                }
                 this.$message.success('保存成功!');
               }
             } catch (error) {

+ 198 - 0
src/views/warehouseManagement/stockManagement/components/details.vue

@@ -0,0 +1,198 @@
+<template>
+  <el-dialog
+    title="详情"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="80%"
+  >
+    <!-- 数据表格 -->
+    <ele-pro-table
+      ref="table"
+      v-if="detailType == 1"
+      :columns="columns"
+      cache-key="detailsTable"
+      height="calc(100vh - 350px)"
+    >
+      <template v-slot:totalCount="{ row }">
+        {{ row.totalCount }}{{ row.measuringUnit }}
+      </template>
+    </ele-pro-table>
+
+    <ele-pro-table
+      ref="table2"
+      v-if="detailType == 2"
+      :columns="columns2"
+      cache-key="detailsTable2"
+      height="calc(100vh - 350px)"
+    >
+      <template v-slot:totalCount="{ row }">
+        {{ row.totalCount }}{{ row.measuringUnit }}
+      </template>
+    </ele-pro-table>
+  </el-dialog>
+</template>
+
+<script>
+  export default {
+    components: {},
+    data() {
+      return {
+        visible: false,
+        detailType: null
+      };
+    },
+
+    computed: {
+      // 表格列配置
+      columns() {
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+
+          {
+            prop: 'categoryCode',
+            label: '编码',
+            align: 'center'
+          },
+          {
+            prop: 'categoryName',
+            label: '名称',
+            align: 'center'
+          },
+
+          {
+            prop: 'brandNum',
+            label: '牌号',
+            align: 'center'
+          },
+
+          {
+            prop: 'modelType',
+            label: '型号',
+            align: 'center'
+          },
+
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center'
+          },
+
+          {
+            slot: 'totalCount',
+            label: '数量',
+            align: 'center'
+          }
+        ];
+      },
+
+      columns2() {
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+
+          {
+            prop: 'categoryCode',
+            label: '编码',
+            align: 'center'
+          },
+          {
+            prop: 'categoryName',
+            label: '名称',
+            align: 'center'
+          },
+
+          {
+            prop: 'brandNum',
+            label: '牌号',
+            align: 'center'
+          },
+
+          {
+            prop: 'modelType',
+            label: '型号',
+            align: 'center'
+          },
+
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center'
+          },
+
+          {
+            label: '物料代号',
+            prop: 'extInfo.materielCode',
+            align: 'center'
+          },
+          {
+            label: '客户代号',
+            prop: 'extInfo.clientCode',
+            align: 'center'
+          },
+          {
+            label: '刻码',
+            prop: 'extInfo.engrave',
+            align: 'center'
+          },
+          {
+            label: '重量',
+            prop: 'extInfo.newWeight',
+            align: 'center'
+          },
+
+          {
+            slot: 'totalCount',
+            label: '数量',
+            align: 'center'
+          }
+        ];
+      },
+
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
+    },
+
+    watch: {},
+    methods: {
+      open(row) {
+        this.visible = true;
+        if (row.detailType == 1) {
+          this.detailType = 1;
+          this.$nextTick(() => {
+            this.$refs.table.setData([...row.detailList]);
+          });
+        } else if (row.detailType == 2) {
+          this.detailType = 2;
+          this.$nextTick(() => {
+            this.$refs.table2.setData([...row.detailList]);
+          });
+        }
+      },
+
+      handleClose() {
+        this.visible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped></style>

+ 270 - 0
src/views/warehouseManagement/stockManagement/components/outsourcedOrders.vue

@@ -0,0 +1,270 @@
+<template>
+  <div>
+    <el-dialog
+      title="选择委外订单"
+      :visible.sync="dialogVisible"
+      width="90%"
+      :before-close="handleClose"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <div class="main">
+        <ele-pro-table
+          ref="table"
+          :initLoad="false"
+          :columns="columns"
+          :current.sync="current"
+          highlight-current-row
+          :datasource="datasource"
+          tool-class="ele-toolbar-form"
+          cache-key="systemOrgUserTable"
+          @row-click="chooseRow"
+        >
+          <template v-slot:requireDeliveryTime="{ row }">
+            <span v-if="row.deliveryMethod == 1">{{
+              row.requireDeliveryTime
+            }}</span>
+
+            <el-link
+              v-if="row.deliveryMethod == 2"
+              type="primary"
+              :underline="false"
+              @click.native="handleMethod(row)"
+              >分批时间</el-link
+            >
+          </template>
+
+          <template v-slot:type="{ row }">
+            <div v-if="row.type == 1">生产中需要采购参与的委外</div>
+            <div v-if="row.type == 2">仓库直接发货的委外</div>
+            <div v-if="row.type == 3">生产中不需要采购参与的委外</div>
+          </template>
+
+          <template v-slot:status="{ row }">
+            <el-tag>{{ row.status == 1 ? '已发布' : '未发布' }}</el-tag>
+          </template>
+
+          <template v-slot:technicalDrawings="{ row }">
+            <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
+              <el-link
+                v-for="link in row.technicalDrawings"
+                :key="link.id"
+                type="primary"
+                :underline="false"
+                @click="downloadFile(link)"
+              >
+                {{ link.name }}</el-link
+              >
+            </div>
+          </template>
+
+          <template v-slot:files="{ row }">
+            <div v-if="row.files && row.files?.length">
+              <el-link
+                v-for="link in row.files"
+                :key="link.id"
+                type="primary"
+                :underline="false"
+                @click="downloadFile(link)"
+              >
+                {{ link.name }}</el-link
+              >
+            </div>
+          </template>
+
+          <template v-slot:action="{ row }">
+            <el-link
+              type="primary"
+              :underline="false"
+              @click="handleDetails(row)"
+            >
+              详情
+            </el-link>
+          </template>
+        </ele-pro-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="handleMine">确 定</el-button>
+      </span>
+    </el-dialog>
+    <detail ref="detailsRef"></detail>
+  </div>
+</template>
+
+<script>
+  import { getOutsourcedOrdersList } from '@/api/mes';
+  import detail from './details.vue';
+  export default {
+    components: { detail },
+    data() {
+      return {
+        dialogVisible: false,
+        pages: {
+          pageNum: 1,
+          size: 10
+        },
+        total: 0,
+        tableData: [],
+        current: {},
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+
+          {
+            prop: 'code',
+            label: '委外单编码',
+            align: 'center'
+          },
+          {
+            prop: 'name',
+            label: '委外单名称',
+            align: 'center'
+          },
+
+          {
+            prop: 'workOrderCode',
+            label: '工单编码',
+            align: 'center'
+          },
+
+          {
+            prop: 'taskName',
+            label: '工序',
+            align: 'center'
+          },
+
+          {
+            prop: 'totalCount',
+            label: '委外数量',
+            align: 'center'
+          },
+
+          {
+            prop: 'totalWeight',
+            label: '委外重量',
+            align: 'center'
+          },
+
+          {
+            slot: 'type',
+            label: '委外类型',
+            align: 'center'
+          },
+
+          {
+            prop: 'remark',
+            label: '备注',
+            align: 'center'
+          },
+
+          {
+            slot: 'requireDeliveryTime',
+            label: '预计到货日期',
+            align: 'center',
+            minWidth: 70
+          },
+
+          {
+            prop: 'produceRoutingName',
+            label: '工艺路线',
+            align: 'center'
+          },
+
+          {
+            prop: 'warehouseName',
+            label: '仓库',
+            align: 'center'
+          },
+
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            minWidth: 70
+          },
+
+          {
+            slot: 'status',
+            label: '状态',
+            align: 'center'
+          },
+
+          {
+            label: '图片附件',
+            slot: 'technicalDrawings',
+            action: 'technicalDrawings',
+            minWidth: 100
+          },
+
+          {
+            label: '附件',
+            slot: 'files',
+            action: 'files',
+            minWidth: 100
+          },
+
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 140,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ]
+      };
+    },
+    methods: {
+      async open() {
+        const listParent = this.$parent.outsourcedOrdersRow;
+        if (JSON.stringify(listParent) == '{}') {
+          this.current = null;
+        }
+        this.dialogVisible = true;
+        this.$nextTick(() => {
+          this.$refs.table.reload({
+            pageNum: 1,
+            size: 10,
+            where: {}
+          });
+        });
+      },
+      handleDetails(row) {
+        this.$refs.detailsRef.open(row);
+      },
+      async handleMine() {
+        if (this.current) {
+          this.$emit('success', this.current);
+          this.dialogVisible = false;
+        } else {
+          this.$message.warning('请先选择委外单!');
+        }
+      },
+      async datasource({ page, limit, where }) {
+        const { data } = await getOutsourcedOrdersList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+        console.log(data);
+        return data;
+      },
+      chooseRow(row) {
+        this.current = row;
+      },
+      handleClose() {
+        this.dialogVisible = false;
+      }
+    }
+  };
+</script>

+ 14 - 2
src/views/warehouseManagement/stockManagement/details.vue

@@ -315,6 +315,7 @@
             :data="detailList"
             tooltip-effect="dark"
             :max-height="300"
+            :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
             style="width: 100%"
             stripe
@@ -419,6 +420,7 @@
             :data="metailList"
             tooltip-effect="dark"
             :max-height="300"
+            :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
             style="width: 100%"
             stripe
@@ -648,6 +650,14 @@
         const code = this.codeList.find((item) => item.dictCode == r);
         return code?.dictValue;
       },
+      tableRowClassName({ row, rowIndex }) {
+        console.log(row);
+        if (row.result == 1) {
+          return 'warning-row';
+        } else {
+          return '';
+        }
+      },
       rowClass({ row, column, rowIndex, columnIndex }) {
         if (rowIndex === 1) {
           return {
@@ -656,8 +666,7 @@
             border: 'none'
           };
         }
-
-        return { background: '#EEEEEE', border: 'none' };
+        return { background: '#0000', border: 'none' };
       },
       async _getInfo() {
         const res = await outin.getById(this.$route.query.id);
@@ -716,6 +725,9 @@
 </script>
 
 <style lang="scss" scoped>
+  ::v-deep .warning-row {
+    color: red;
+  }
   ::v-deep .page-title {
     border-bottom: none;
   }

+ 3 - 1
src/views/warehouseManagement/warehouseDefinition/components/WarehouseEdit.vue

@@ -243,8 +243,10 @@
                   warehouseVO.province,
                   warehouseVO.city,
                   warehouseVO.area
-                ]
+                ],
+                inventoryType: warehouseVO.inventoryType + ''
               };
+              console.log(this.formData);
               this.loadingVis = false;
             }, 2000);
           });