huang_an пре 1 година
родитељ
комит
e6c43f39c8

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

@@ -84,3 +84,21 @@ export async function getOutsourcedOrdersList(params) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 获取受托收货单列表
+export async function getSaleentrustedreceiveList(params) {
+  const res = await request.get(`/eom/saleentrustedreceive/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取项目立项列表
+export async function getProjectsList(data) {
+  const res = await request.post(`/pro/projects/page`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 2 - 0
src/utils/dict/warehouse.js

@@ -44,6 +44,8 @@ export const sceneState = [
   { code: 10, label: '委外入库', documentsName: '委外订单' },
   { code: 11, label: '委外退货入库', documentsName: '委外发货单' },
   { code: 12, label: '委外入库(非采购)', documentsName: '委外申请单' },
+  { code: 13, label: '受托入库', documentsName: '受托收货单' },
+  { code: 14, label: '项目入库', documentsName: '项目编码' },
   { code: 99, label: '其他入库' }
 ];
 export const outputSceneState = [

+ 5 - 0
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -320,6 +320,11 @@
                   label="重量单位"
                   prop="weightUnit"
                 ></el-table-column>
+                <el-table-column
+                  v-if="clientEnvironmentId == 4"
+                  label="级别"
+                  prop="level"
+                ></el-table-column>
                 <el-table-column
                   v-if="clientEnvironmentId == 4"
                   label="用途"

+ 5 - 0
src/views/warehouseManagement/outgoingManagement/details.vue

@@ -192,6 +192,11 @@
                     {{ row.price ? row.price : '-' }}元/{{ row.measuringUnit }}
                   </template>
                 </el-table-column>
+                <el-table-column
+                  v-if="clientEnvironmentId == 4"
+                  label="级别"
+                  prop="level"
+                ></el-table-column>
                 <el-table-column
                   v-if="clientEnvironmentId == 4"
                   label="用途"

+ 1 - 0
src/views/warehouseManagement/sparePartsOutbound/add.vue

@@ -276,6 +276,7 @@
                     <template v-else>{{ row[item.prop] }}</template>
                   </template>
                 </el-table-column>
+                <el-table-column label="级别" prop="level"></el-table-column>
                 <el-table-column label="用途" prop="purpose" width="200">
                   <template slot-scope="{ row }">
                     <el-input placeholder="请输入" v-model="row.purpose" />

+ 1 - 0
src/views/warehouseManagement/sparePartsOutbound/details.vue

@@ -152,6 +152,7 @@
                     <template v-else>{{ row[item.prop] }}</template>
                   </template>
                 </el-table-column>
+                <el-table-column label="级别" prop="level"></el-table-column>
                 <el-table-column label="用途" prop="purpose"></el-table-column>
                 <!-- <el-table-column
                   label="批号"

+ 20 - 1
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -236,6 +236,11 @@
                 label: '批号',
                 align: 'center'
               },
+              {
+                prop: 'level',
+                label: '级别',
+                showOverflowTooltip: true
+              },
               {
                 prop: 'availableCountBase',
                 label: '计量库存数量',
@@ -356,6 +361,11 @@
                 label: '批号',
                 align: 'center'
               },
+              {
+                prop: 'level',
+                label: '级别',
+                showOverflowTooltip: true
+              },
               {
                 prop: 'packingCountBase',
                 label: '包装库存数量',
@@ -384,7 +394,6 @@
                 width: 130,
                 align: 'center'
               },
-
               {
                 prop: 'measuringUnit',
                 label: '计量单位',
@@ -508,6 +517,11 @@
                 label: '批号',
                 align: 'center'
               },
+              {
+                prop: 'level',
+                label: '级别',
+                showOverflowTooltip: true
+              },
               {
                 prop: 'barcodes',
                 label: '发货条码',
@@ -674,6 +688,11 @@
                 label: '批号',
                 align: 'center'
               },
+              {
+                prop: 'level',
+                label: '级别',
+                showOverflowTooltip: true
+              },
               {
                 prop: 'barcodes',
                 label: '发货条码',

+ 58 - 3
src/views/warehouseManagement/stockManagement/add.vue

@@ -170,7 +170,9 @@
                 formData.bizType != 2 &&
                 formData.bizType != 3 &&
                 formData.bizType != 10 &&
-                formData.bizType != 12
+                formData.bizType != 12 &&
+                formData.bizType != 13 &&
+                formData.bizType != 14
               "
               label="销售订单"
               prop="documentSource"
@@ -190,6 +192,28 @@
                 clearable
                 v-model="formData.extInfo.documentSource"
             /></el-form-item>
+            <el-form-item
+              v-if="formData.bizType == 13"
+              label="受托收货单"
+              prop="documentSource"
+            >
+              <el-input
+                placeholder="请输入"
+                clearable
+                @click.native="handleDeliveryNote()"
+                v-model="formData.extInfo.documentSource"
+            /></el-form-item>
+            <el-form-item
+              v-if="formData.bizType == 14"
+              label="项目编码"
+              prop="documentSource"
+            >
+              <el-input
+                placeholder="请输入"
+                clearable
+                @click.native="handleProjectCode()"
+                v-model="formData.extInfo.documentSource"
+            /></el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="权属部门" prop="deptName">
@@ -1322,12 +1346,24 @@
       ref="outsourcedOrdersRef"
       @success="outsourcedOrdersSuccess"
     />
+    <!-- 受托收货单 -->
+    <deliveryNote
+      ref="deliveryNoteRef"
+      @success="deliveryNoteSuccess"
+    ></deliveryNote>
+    <!-- 项目立项 -->
+    <projectCode
+      ref="projectCodeRef"
+      @success="projectCodeSuccess"
+    ></projectCode>
   </div>
 </template>
 
 <script>
   import { add, bignumber } from 'mathjs';
   import picker from './components/picker.vue';
+  import deliveryNote from './components/deliveryNote.vue';
+  import projectCode from './components/projectCode.vue';
   import stockOutOrder from './components/stockOutOrder.vue';
   import outsourcedOrders from './components/outsourcedOrders.vue';
   import outin from '@/api/warehouseManagement/outin';
@@ -1367,7 +1403,9 @@
       ReturnSelect,
       picker,
       outsourcedOrders,
-      stockOutOrder
+      stockOutOrder,
+      projectCode,
+      deliveryNote
     },
     data() {
       return {
@@ -1415,7 +1453,8 @@
         dateVisible: false,
         treeList: [],
         staffList: [],
-
+        deliveryNoteRow: {},
+        projectCodeRow: {},
         formData: {
           extInfo: {
             assetType: '', //物品类型
@@ -2010,6 +2049,16 @@
         this.formData.extInfo.documentSource = row.code;
         this.$forceUpdate();
       },
+      deliveryNoteSuccess(row) {
+        this.deliveryNoteRow = row;
+        this.formData.extInfo.documentSource = row.code;
+        this.$forceUpdate();
+      },
+      projectCodeSuccess(row) {
+        this.projectCodeRow = row;
+        this.formData.extInfo.documentSource = row.code;
+        this.$forceUpdate();
+      },
       // 包装删除
       wrapDelete(row, index) {
         // 删除包装
@@ -2348,6 +2397,12 @@
       handlePicker() {
         this.$refs.pickerRef.open();
       },
+      handleDeliveryNote() {
+        this.$refs.deliveryNoteRef.open();
+      },
+      handleProjectCode() {
+        this.$refs.projectCodeRef.open();
+      },
       codeListValue(val) {
         this.formData.extInfo.assetType = val.id;
         this.$forceUpdate();

+ 156 - 0
src/views/warehouseManagement/stockManagement/components/deliveryNote.vue

@@ -0,0 +1,156 @@
+<template>
+  <div>
+    <el-dialog
+      title="选择受托收货单"
+      :visible.sync="dialogVisible"
+      width="60%"
+      :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:action="{ row }">
+            <el-radio class="radio" v-model="radio" :label="row.id"
+              ><i></i
+            ></el-radio>
+          </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>
+  </div>
+</template>
+
+<script>
+  import { getSaleentrustedreceiveList } from '@/api/mes';
+  export default {
+    data() {
+      return {
+        reviewStatusEnum: [
+          { value: 0, label: '未提交' },
+          { value: 1, label: '审核中' },
+          { value: 2, label: '已审核' },
+          { value: 3, label: '审核未通过' }
+        ],
+        dataSource: {},
+        dialogVisible: false,
+        pages: {
+          pageNum: 1,
+          size: 10
+        },
+        total: 0,
+        tableData: [],
+        current: {},
+        radio: null,
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '发货单编码',
+            align: 'center',
+            slot: 'code',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            prop: 'orderNo',
+            label: '采购订单编码',
+            align: 'center',
+            slot: 'orderNo',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            prop: 'supplierName',
+            label: '外协单位',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 180
+          },
+          {
+            prop: 'reviewStatus',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120,
+            formatter: (_row, _column, cellValue) => {
+              return this.reviewStatusEnum[_row.reviewStatus].label;
+            }
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 170
+          },
+          {
+            columnKey: 'action',
+            slot: 'action',
+            align: 'center',
+            fixed: 'right',
+            width: 50
+          }
+        ]
+      };
+    },
+    methods: {
+      async handleMine() {
+        if (this.current == null) {
+          this.$message.warning('请先选择委外收货单!');
+          return;
+        }
+        this.$emit('success', this.current);
+        this.dialogVisible = false;
+      },
+      datasource({ page, limit }) {
+        const data = getSaleentrustedreceiveList({
+          pageNum: page,
+          size: limit
+        });
+        this.dataSource = data;
+        return data;
+      },
+      async open() {
+        this.current = {};
+        this.radio = null;
+        this.dialogVisible = true;
+        this.$nextTick(() => {
+          this.$refs.table.reload({
+            pageNum: 1,
+            size: 10
+          });
+        });
+      },
+      chooseRow(row) {
+        this.current = row;
+        this.radio = row.id;
+      },
+      handleClose() {
+        this.dialogVisible = false;
+      }
+    }
+  };
+</script>

+ 279 - 0
src/views/warehouseManagement/stockManagement/components/projectCode.vue

@@ -0,0 +1,279 @@
+<template>
+  <div>
+    <el-dialog
+      title="选择项目"
+      :visible.sync="dialogVisible"
+      width="60%"
+      :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:action="{ row }">
+            <el-radio class="radio" v-model="radio" :label="row.id"
+              ><i></i
+            ></el-radio>
+          </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>
+  </div>
+</template>
+
+<script>
+  import { getProjectsList } from '@/api/mes';
+  import { getByCode } from '@/api/system/dictionary-data';
+  export default {
+    data() {
+      return {
+        reviewStatusEnum: [
+          { value: 0, label: '未提交' },
+          { value: 1, label: '审核中' },
+          { value: 2, label: '已审核' },
+          { value: 3, label: '审核未通过' }
+        ],
+        dictList: [],
+        dataSource: {},
+        dialogVisible: false,
+        pages: {
+          pageNum: 1,
+          size: 10
+        },
+        total: 0,
+        tableData: [],
+        current: {},
+        radio: null,
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'type',
+            label: '项目类型',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            align: 'center',
+            slot: 'type'
+          },
+          {
+            prop: 'code',
+            label: '项目编码',
+            showOverflowTooltip: true,
+            minWidth: 160,
+            slot: 'code',
+            align: 'center'
+          },
+          {
+            prop: 'name',
+            label: '项目名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+
+          {
+            prop: 'responsibleDeptName',
+            label: '负责部门',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'responsibleUserName',
+            label: '项目经理',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'teamName',
+            label: '项目团队',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'cycle',
+            label: '项目周期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'budget',
+            label: '项目预算',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row, _column, cellValue) => {
+              return cellValue
+                ? cellValue +
+                    this.getDictV('pro_projects_budget_unit', _row.unit)
+                : '';
+            }
+          },
+          {
+            prop: 'planStartDate',
+            label: '计划开始日期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'planEndDate',
+            label: '计划完成日期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'realStartTime',
+            label: '实际开始日期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'realEndTime',
+            label: '实际完成日期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'cost',
+            label: '花费(元)',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'status',
+            label: '项目状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            slot: 'status'
+          },
+          {
+            prop: 'processStatus',
+            label: '审核状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return this.reviewStatusEnum[_row.processStatus].label;
+            }
+          },
+          {
+            prop: 'isOverTime',
+            label: '是否超时',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            slot: 'isOverTime'
+          },
+          {
+            prop: 'isOverbudget',
+            label: '是否超预算',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            slot: 'isOverbudget'
+          },
+          {
+            prop: 'speedPercent',
+            label: '项目进度',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            slot: 'speedPercent'
+          },
+          {
+            columnKey: 'action',
+            slot: 'action',
+            align: 'center',
+            fixed: 'right',
+            width: 50
+          }
+        ]
+      };
+    },
+    methods: {
+      async handleMine() {
+        if (this.current == null) {
+          this.$message.warning('请先选择项目!');
+          return;
+        }
+        this.$emit('success', this.current);
+        this.dialogVisible = false;
+      },
+      getDictV(code, val) {
+        if (!this.dictList[code]) return '';
+        return this.dictList[code].find((item) => item.value == val)?.label;
+      },
+      async getDictList(code) {
+        let { data: res } = await getByCode(code);
+        this.dictList[code] = res.map((item) => {
+          let values = Object.keys(item);
+          return {
+            value: values[0],
+            label: item[values[0]]
+          };
+        });
+      },
+      async datasource({ page, limit, where, parent }) {
+        await this.getDictList('pro_projects_status');
+        await this.getDictList('pro_projects_type');
+        await this.getDictList('pro_projects_budget_unit');
+        return getProjectsList({
+          pageNum: page,
+          size: limit,
+          parentId: parent?.id ?? '0',
+          ...where
+        });
+      },
+      async open() {
+        this.current = {};
+        this.radio = null;
+        this.dialogVisible = true;
+        this.$nextTick(() => {
+          this.$refs.table.reload({
+            pageNum: 1,
+            size: 10,
+            parentId: '0',
+            where: {}
+          });
+        });
+      },
+      chooseRow(row) {
+        this.current = row;
+        this.radio = row.id;
+      },
+      handleClose() {
+        this.dialogVisible = false;
+      }
+    }
+  };
+</script>

+ 1 - 1
src/views/warehouseManagement/stockManagement/details.vue

@@ -34,7 +34,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="8">
-                <el-form-item label="销售订单:">
+                <el-form-item label="关联订单:">
                   <span>{{ extInfo.documentSource }}</span>
                 </el-form-item>
               </el-col>