huang_an il y a 2 ans
Parent
commit
8f2dd42134

+ 11 - 3
src/api/mes/index.js

@@ -44,16 +44,24 @@ export async function getById(id) {
   }
   return Promise.reject(new Error(res.data.message));
 }
-export async function purchaseorderPage(params) {
-  const res = await request.get(`eom/purchaseorder/page`, { params });
+export async function purchaseorderreceive(params) {
+  const res = await request.get(`/eom/purchaseorderreceive/page`, { params });
   if (res.data.code == 0) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
 }
 
+export async function oneId(id) {
+  const res = await request.get(`/eom/purchaseorderreceive/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
 export async function purchaseorderGetById(id) {
-  const res = await request.get(`eom/purchaseorder/getById/${id}`);
+  const res = await request.get(`/eom/purchaseorder/getById/${id}`);
   if (res.data.code == 0) {
     return res.data;
   }

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

@@ -883,8 +883,20 @@
                   v-model="row.weight"
                   @input="
                     (value) => {
-                      const newValue = value.replace(/^(0+)|[^\d]+/g, '');
-                      row.weight = parseFloat(newValue, 10); // 转换为数字类型
+                      const newValue = value.replace(/[^\d.]/g, ''); // 保留数字和小数点
+                      const decimalCount = (newValue.match(/\./g) || []).length; // 计算小数点的个数
+                      if (decimalCount > 1) {
+                        // 如果小数点个数大于1,移除多余的小数点
+                        const lastIndex = newValue.lastIndexOf('.');
+                        row.weight =
+                          newValue.slice(0, lastIndex) +
+                          newValue.slice(lastIndex + 1);
+                      } else if (decimalCount === 1) {
+                        // 如果小数点个数等于1,允许小数点的输入
+                        row.weight = newValue;
+                      } else {
+                        row.weight = newValue === '' ? 0 : parseFloat(newValue); // 如果输入为空,则设为0
+                      }
                     }
                   "
                 ></el-input>

+ 25 - 19
src/views/warehouseManagement/stockManagement/components/picker.vue

@@ -21,14 +21,14 @@
           @row-click="chooseRow"
         >
           <!-- 表头工具栏 -->
-          <template v-slot:docNo="{ row }">
+          <template v-slot:receiveNo="{ row }">
             <!-- @click="details(row)" -->
             <el-link
               type="primary"
               @click="pickOrderEdit(row)"
               :underline="false"
             >
-              {{ row.docNo }}
+              {{ row.receiveNo }}
             </el-link>
           </template>
           <template v-slot:replied="{ row }">
@@ -53,15 +53,15 @@
       </span>
     </el-dialog>
 
-    <!-- <eomEdit ref="eomEditRef" /> -->
+    <pickerDetails ref="pickerDetailsEditRef" />
   </div>
 </template>
 
 <script>
-  import { purchaseorderPage, getById } from '@/api/mes';
-  // import eomEdit from './eomEdit.vue';
+  import { purchaseorderreceive, getById } from '@/api/mes';
+  import pickerDetails from './pickerDetails.vue';
   export default {
-    // components: { eomEdit },
+    components: { pickerDetails },
     data() {
       return {
         dataSource: {},
@@ -84,32 +84,38 @@
             showOverflowTooltip: true,
             fixed: 'left'
           },
+          {
+            prop: 'receiveNo',
+            slot: 'receiveNo',
+            label: '收货编码',
+            showOverflowTooltip: true
+          },
           {
             prop: 'orderNo',
-            label: '订单编号',
+            label: '采购订单编号',
             showOverflowTooltip: true
           },
           {
-            prop: 'contractName',
-            label: '合同名称',
+            prop: 'supplierName',
+            label: '供应商名称',
             showOverflowTooltip: true
           },
           {
-            prop: 'purchaseTypeName',
-            label: '采购类型',
+            prop: 'sendNoteNo',
+            label: '送货单号',
             showOverflowTooltip: true
           },
           {
-            prop: 'partaName',
-            label: '采购方名称',
+            prop: 'reviewStatus',
+            slot: 'reviewStatus',
+            label: '状态',
             showOverflowTooltip: true
           },
           {
-            prop: 'partbName',
-            label: '供应商名称',
+            prop: 'createTime',
+            label: '创建时间',
             showOverflowTooltip: true
           },
-
           {
             columnKey: 'action',
             slot: 'action',
@@ -122,7 +128,7 @@
     },
     methods: {
       pickOrderEdit(row) {
-        this.$refs.eomEditRef.open(row);
+        this.$refs.pickerDetailsEditRef.open(row);
       },
       async handleMine() {
         const listParent = this.$parent.warehousingMaterialList;
@@ -200,7 +206,7 @@
         // const res = await pickOrderPage(this.pages);
         // this.tableData = res.data.list;
         // this.total = res.data.count;
-        const data = purchaseorderPage({
+        const data = purchaseorderreceive({
           pageNum: page,
           size: limit,
           ...where
@@ -224,7 +230,7 @@
             where: {}
           });
         });
-        // const res = await purchaseorderPage(this.pages);
+        // const res = await purchaseorderreceive(this.pages);
         // console.log(res);
         // this.tableData = res.data.list;
         // this.total = res.data.count;

+ 230 - 0
src/views/warehouseManagement/stockManagement/components/pickerDetails.vue

@@ -0,0 +1,230 @@
+<template>
+  <div>
+    <el-dialog
+      title="销售订单详情"
+      :visible.sync="dialogVisible"
+      width="60%"
+      :before-close="handleClose"
+    >
+      <div class="main">
+        <header-title title="发货信息" size="16px"></header-title>
+        <el-row>
+          <el-col :offset="2" :span="8"
+            >供应商名称:{{ orderRow.supplierName }}</el-col
+          >
+          <el-col :offset="6" :span="8">车牌号:{{ orderRow.carNo }}</el-col>
+        </el-row>
+        <el-row>
+          <el-col :offset="2" :span="8"
+            >供应商联系人:{{ orderRow.linkName }}</el-col
+          >
+          <el-col :offset="6" :span="8"
+            >收货单编码:{{ orderRow.receiveNo }}</el-col
+          >
+        </el-row>
+        <el-row>
+          <el-col :offset="2" :span="8"
+            >供应商电话:{{ orderRow.linkPhone }}</el-col
+          >
+          <el-col :offset="6" :span="8"
+            >制单人:{{ orderRow.makerName }}</el-col
+          >
+        </el-row>
+        <el-row>
+          <el-col :offset="2" :span="8"
+            >审核状态:{{ orderRow.reviewStatus }}</el-col
+          >
+          <el-col :offset="6" :span="8"
+            >订单编码:{{ orderRow.orderNo }}</el-col
+          >
+        </el-row>
+        <el-row>
+          <el-col :offset="2" :span="8">附件:{{ orderRow.sendFiles }}</el-col>
+        </el-row>
+        <header-title title="产品清单" size="16px"></header-title>
+        <el-table border :data="orderRow.productList" style="width: 100%">
+          <el-table-column type="index" width="80" label="序号" align="center">
+          </el-table-column>
+          <el-table-column
+            prop="productName"
+            label="名称"
+            width="180"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="productCode"
+            label="编码"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="productCategoryName"
+            label="类型"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="productBrand"
+            label="牌号"
+            width="180"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="modelType"
+            label="型号"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="specification"
+            label="规格"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="warehouseName"
+            label="仓库"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="totalCount"
+            width="120"
+            label="进货数量"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="orderTotalCount"
+            width="120"
+            label="总数量"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="measuringUnit"
+            label="计量单位"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="singlePrice"
+            label="单价"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="totalPrice"
+            label="合计"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="deliveryDays"
+            label="交期(天)"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="deliveryDeadline"
+            label="交期截止日期"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="guaranteePeriod"
+            label="质保期"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="guaranteePeriodDeadline"
+            label="质保截止日期"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="technicalAnswerName"
+            label="技术答疑人"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="technicalParams"
+            label="技术参数"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="technicalDrawings"
+            label="技术图纸"
+            width="120"
+            align="center"
+          >
+            <template slot-scope="{ row }">
+              {{ row.technicalDrawings[0].name }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="remark"
+            label="备注"
+            width="120"
+            align="center"
+          >
+          </el-table-column>
+        </el-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 { oneId } from '@/api/mes';
+  export default {
+    data() {
+      return {
+        dialogVisible: false,
+        orderRow: {},
+        status: ['未提交', '待审核', '已审核', '审核未通过']
+      };
+    },
+    methods: {
+      handleMine() {},
+      async open(row) {
+        const data = await oneId(row.id);
+        console.log('===', data);
+        this.orderRow = {
+          ...data.data
+        };
+        this.dialogVisible = true;
+      },
+      handleClose(done) {}
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .el-row {
+    margin-bottom: 15px;
+    font-size: 14px;
+  }
+</style>