浏览代码

单证- 发运明细 维护款号成分

liangy 2 年之前
父节点
当前提交
2cd71c6adb

+ 0 - 1
src/views/order/orderList.vue

@@ -49,7 +49,6 @@ c<template>
 
               <a-col :md="6" :sm="8">
                 <a-form-item label="成品/面辅料">
-                  <!-- 成品传0 面辅料传1 -->
                   <a-select placeholder="请选择" v-model="queryParam.isProduct">
                     <a-select-option value="">请选择</a-select-option>
                     <a-select-option value="0">成品</a-select-option>

+ 1 - 0
src/views/pre-book/preBookList.vue

@@ -43,6 +43,7 @@
                 </a-form-item>
               </a-col>
             </template>
+            
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>

+ 2 - 52
src/views/shipment-details/editShipDetDrawer.vue

@@ -1,18 +1,11 @@
 <template>
   <!-- 编辑发运明细 -->
   <div id="editShipDetDrawer">
-    <a-drawer
-      title="编辑"
-      width="89%"
-      placement="right"
-      :closable="true"
-      :visible="visible"
-      @close="handleCancel">
+    <a-drawer title="编辑" width="89%" placement="right" :closable="true" :visible="visible" @close="handleCancel">
       <!-- 主表信息 编辑 :rules="validatorRules"-->
       <a-card :bordered="true">
         <div class="table-page-search-wrapper">
           <a-form-model layout="inline" ref="form" :model="editShipDet">
-            <!-- 主表信息 填写-->
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
                 <!-- required必填项 disabled 禁用  -->
@@ -60,60 +53,18 @@
                 </a-form-model-item>
               </a-col>
 
-              <!-- <a-col :md="6" :sm="8">
-                <a-form-model-item label="pack id" prop="packId">
-                  <a-input placeholder="请输入pack id" v-model="editShipDet.packId"></a-input>
-                </a-form-model-item>
-              </a-col> -->
-
-              <!-- <a-col :md="6" :sm="8">
-                <a-form-model-item label="分销点" prop="distributionPoint">
-                  <a-input placeholder="请输入分销点" v-model="editShipDet.distributionPoint"></a-input>
-                </a-form-model-item>
-              </a-col> -->
-
-              <!-- <a-col :md="6" :sm="8">
-                <a-form-model-item label="数量" prop="todo">
-                  <a-input placeholder="合计" v-model="editShipDet.todo"></a-input>
-                </a-form-model-item>
-              </a-col> -->
-
-              <!-- <a-col :md="6" :sm="8">
-                <a-form-model-item label="单价" prop="salesUnitPrice">
-                  <a-input placeholder="销售" v-model="editShipDet.salesUnitPrice"></a-input>
-                </a-form-model-item>
-              </a-col> -->
-
-              <!-- <a-col :md="6" :sm="8">
-                <a-form-model-item label="采购/委外订单号" prop="purOrSubOrder">
-                  <a-input placeholder="请输入采购/委外订单号" v-model="editShipDet.purOrSubOrder"></a-input>
-                </a-form-model-item>
-              </a-col> -->
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="订单类型" prop="orderType">
                   <a-input placeholder="请输入订单类型" v-model="editShipDet.orderType"></a-input>
                 </a-form-model-item>
               </a-col>
 
-              <!-- <a-col :md="6" :sm="8">
-                <a-form-model-item label="工厂单价" prop="factoryUnitPrice">
-                  <a-input placeholder="采购/委外单价" v-model="editShipDet.factoryUnitPrice"></a-input>
-                </a-form-model-item>
-              </a-col> -->
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="HScode" prop="hsCode">
                   <a-input placeholder="HScode" v-model="editShipDet.hsCode"></a-input>
                 </a-form-model-item>
               </a-col>
 
-              <!-- <a-col :md="6" :sm="8">
-                <a-form-model-item label="套装件数" prop="numberOfSets">
-                  <a-input placeholder="存货自定义项" v-model="editShipDet.numberOfSets"></a-input>
-                </a-form-model-item>
-              </a-col> -->
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="中文品名" prop="chineseName">
                   <a-input placeholder="请输入中文品名" v-model="editShipDet.chineseName"></a-input>
@@ -669,7 +620,7 @@ export default {
     },
     // 编辑 保存
     editSave() {
-      console.log('提交编辑、刷新发运明细列表')
+      // console.log('提交编辑、刷新发运明细列表')
       editById(this.editShipDet).then(res => {
         if (res.success) {
           this.$message.success('编辑成功')
@@ -723,7 +674,6 @@ export default {
 
       this.syShippingDetailsItemList.push(addrow)
     },
-    // --------------------------------------
     // 操作 删除
     handleDelete(index) {
       console.log('index', index)

+ 15 - 37
src/views/shipment-details/itemNumEleModal.vue

@@ -77,51 +77,29 @@ export default {
   data() {
     return {
       loading: false, // 表格加载
-      // orderDataform: this.$form.createForm(this),
       confirmLoading: false,
       itemNumEleModVis: false,
       editItemNumber: {} // 编辑维护款号成分
     }
   },
   // 接收父组件 方法
-  // props: {
-  //   father: {
-  //     type: Function,
-  //     default: null
-  //   }
-  // },
-  created() {},
+  props: {
+    fatherList: {
+      type: Function,
+      default: null
+    }
+  },
+
   methods: {
+    // 保存
     save() {
-      console.log('点击了保存')
-      var newObj = {} // 维护款号成分对象
-      newObj.itemNumber = this.editItemNumber.itemNumber
-      newObj.materialComposition = this.editItemNumber.materialComposition
-      newObj.isTc = this.editItemNumber.isTc
-      console.log('00')
-      if (
-        this.editItemNumber.itemNumber === '' ||
-        this.editItemNumber.materialComposition === '' ||
-        this.editItemNumber.isTc === ''
-      ) {
-        console.log('11')
-        this.$message.error('请输入款号成分')
-      } else {
-        console.log('22')
-        addItemNumEle(newObj).then(res => {
-          console.log('newObj', newObj)
-          if (res.success) {
-            this.$message.success('维护款号成分成功')
-            console.log('款号成分对象', newObj)
-            console.log('33')
-            this.close()
-            // 清空信息
-            newObj = {}
-            newObj.editItemNumber = []
-            // this.fatherList() // 调用父组件 查询方法
-          }
-        })
-      }
+      addItemNumEle(this.editItemNumber).then(res => {
+        if (res.success) {
+          this.$message.success('维护款号成分成功')
+          this.close()
+          this.fatherList() // 调用父组件 重新渲染列表页数据显示
+        }
+      })
     },
     // 取消
     cancel() {

+ 19 - 19
src/views/shipment-details/shipmentList.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 发运明细 列表 -->
   <div id="ShipmentList">
-    <!-- 查询 -->
+    <!-- 查询 回显 且 可编辑 -->
     <a-card :bordered="false">
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -213,7 +213,7 @@
       <declareElements-modal ref="declareElementsModal"></declareElements-modal>
 
       <!-- 维护款号成分 -->
-      <itemNumEle-modal ref="itemNumEleModal"></itemNumEle-modal>
+      <itemNumEle-modal ref="itemNumEleModal" :fatherList="getShipmentList"></itemNumEle-modal>
     </div>
   </div>
 </template>
@@ -384,7 +384,8 @@ export default {
           className: 'replacecolor'
         },
         {
-          title: '工厂单价(采购/委外单价)',
+          // (采购/委外单价)
+          title: '工厂单价',
           dataIndex: 'factoryUnitPrice',
           width: 120,
           className: 'replacecolor'
@@ -396,7 +397,8 @@ export default {
         //   className: 'replacecolor'
         // },
         {
-          title: '套装件数(存货自定义项)',
+          // (存货自定义项)
+          title: '套装件数',
           dataIndex: 'numberOfSets',
           width: 120,
           className: 'replacecolor'
@@ -540,13 +542,24 @@ export default {
     //  维护款号成分
     itemNumberElement(record) {
       this.$refs.itemNumEleModal.itemNumEleModVis = true
-      // console.log('record.itemNumber', record.itemNumber)
+
       this.$refs.itemNumEleModal.editItemNumber.itemIds = record.itemIds
       this.$refs.itemNumEleModal.editItemNumber.itemNumber = record.itemNumber
       this.$refs.itemNumEleModal.editItemNumber.materialComposition = record.materialComposition
       this.$refs.itemNumEleModal.editItemNumber.isTc = record.isTc
     },
 
+    //  编辑
+    edit(record) {
+      this.$refs.editShipDetDrawer.visible = true
+      shipmentQueryById({ id: record.id }).then(res => {
+        if (res.success) {
+          // console.log('编辑对象', res.result)
+          this.$refs.editShipDetDrawer.editShipDet = res.result
+          this.$refs.editShipDetDrawer.syShippingDetailsItemList = res.result.syShippingDetailsItemList
+        }
+      })
+    },
     //  详情
     details(record) {
       this.$refs.detailsShipDetDrawer.visible = true
@@ -561,19 +574,6 @@ export default {
       })
     },
 
-    //  编辑
-    edit(record) {
-      this.$refs.editShipDetDrawer.visible = true
-      shipmentQueryById({ id: record.id }).then(res => {
-        if (res.success) {
-          console.log('编辑对象', res.result)
-          // console.log('子表信息', res.result.syShippingDetailsItemList)
-          this.$refs.editShipDetDrawer.editShipDet = res.result
-          this.$refs.editShipDetDrawer.syShippingDetailsItemList = res.result.syShippingDetailsItemList
-        }
-      })
-    },
-
     //  提交
     submit(record) {
       console.log('点击id:', record.id)
@@ -702,6 +702,6 @@ export default {
 //   background-color: #ccc;
 // }
 /deep/ .ant-form-item {
-  margin-bottom: 0 !important;
+  // margin-bottom: 0 !important;
 }
 </style>