Browse Source

Merge branch 'master' of http://139.196.39.194:9021/chenc/sen-yu-new-web

zengtx 2 years ago
parent
commit
40d815e8d3

+ 5 - 1
src/api/document/shipmentList.js

@@ -40,6 +40,9 @@ const syDeclarationElementsAdd = params =>
 // 参照订单数据
 const queryOrderData = params => getAction('/shippingDetails/syShippingDetails/queryOrderData', params)
 
+// 维护款号成分
+const addItemNumEle = params => postAction('/shippingDetails/syShippingDetails/updateByTcNumberMaterial', params)
+
 export {
   shipmentList,
   addShipmentList,
@@ -52,5 +55,6 @@ export {
   syDeclarationElementsAdd,
   cancelSubmitShipment,
   pushShipment,
-  rePushShipment
+  rePushShipment,
+  addItemNumEle
 }

+ 9 - 3
src/views/order/orderDetailDrawer.vue

@@ -1,6 +1,12 @@
 <template>
   <!-- 【单证】  订单数据 详情 -->
-  <a-drawer title="详情" width="89%" placement="right" :closable="true" :visible="visible" @close="onClose">
+  <a-drawer
+    title="详情"
+    width="89%"
+    placement="right"
+    :closable="true"
+    :visible="visible"
+    @close="onClose">
     <!--主表信息 -->
     <a-card :bordered="true">
       <div class="table-page-search-wrapper">
@@ -195,7 +201,7 @@ export default {
         { title: '存货名称', width: 320, dataIndex: 'inventoryName', align: 'left', className: 'replacecolor' },
         { title: '规格型号', width: 100, dataIndex: 'specificationAndModel', className: 'replacecolor' },
         { title: '颜色', width: 160, dataIndex: 'colour', className: 'replacecolor' },
-        { title: '尺码', width: 100, dataIndex: 'size', className: 'replacecolor' },
+        // { title: '尺码', width: 100, dataIndex: 'size', className: 'replacecolor' },
         { title: '配码规则', width: 160, dataIndex: 'codingRules', className: 'replacecolor' },
         { title: '光坯毛门幅CM', width: 140, dataIndex: 'guangpeiGateWidth', className: 'replacecolor' },
         { title: '箱数', width: 100, dataIndex: 'boxNumber', className: 'replacecolor' },
@@ -225,7 +231,7 @@ export default {
       },
       visible: false, // 抽屉
       dateFormat: 'YYYY-MM-DD',
-      record: {} //点击的订单对象
+      record: {} // 点击的订单对象
     }
   },
 

+ 7 - 8
src/views/order/orderList.vue

@@ -1,4 +1,4 @@
-<template>
+c<template>
   <!-- 【单证】 订单数据 -->
   <div id="orderList">
     <a-card :bordered="false">
@@ -49,7 +49,6 @@
 
               <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>
@@ -149,19 +148,19 @@ export default {
         {
           title: '销售类型',
           width: 100,
-          dataIndex: 'salesTypeValue',
+          dataIndex: 'salesTypeText',
           className: 'replacecolor'
         },
-        { title: '客户简称', width: 150, dataIndex: 'customerAbbreviation', className: 'replacecolor' },
+        { title: '客户简称', width: 220, dataIndex: 'customerAbbreviation', align: 'left', className: 'replacecolor' },
         { title: '客户名称', width: 220, dataIndex: 'customerName', align: 'left', className: 'replacecolor' },
         { title: '供应商', width: 120, dataIndex: 'supplier', className: 'replacecolor' },
         { title: '汇率', width: 90, dataIndex: 'exchangeRate', className: 'replacecolor' },
         { title: '整单合计', width: 120, dataIndex: 'wholeOrderTotal', className: 'replacecolor' },
         { title: '销售部门', width: 100, dataIndex: 'salesDepartment', className: 'replacecolor' },
         { title: '业务员', width: 140, dataIndex: 'salesman', className: 'replacecolor' },
-        { title: '币种', width: 90, dataIndex: 'currencyValue', className: 'replacecolor' },
-        { title: '品牌方', width: 120, dataIndex: 'brandSide', className: 'replacecolor' },
-        { title: '第三方', width: 120, dataIndex: 'thirdParty', className: 'replacecolor' },
+        { title: '币种', width: 90, dataIndex: 'currencyText', className: 'replacecolor' },
+        { title: '品牌方', width: 220, dataIndex: 'brandSide',align: 'left', className: 'replacecolor' },
+        { title: '第三方', width: 220, dataIndex: 'thirdParty',  align: 'left', className: 'replacecolor' },
         { title: '定金比例(%)', width: 120, dataIndex: 'depositRatio', className: 'replacecolor' },
         { title: '定金', width: 100, dataIndex: 'deposit', className: 'replacecolor' },
         { title: '协同路线', width: 160, dataIndex: 'collaborativeRoute', className: 'replacecolor' },
@@ -225,7 +224,7 @@ export default {
         orderList(this.queryParam).then(res => {
           if (res.success) {
             this.orderListData = res.result.records
-            // console.log('订单数据列表', this.orderListData)
+            console.log('订单数据列表', this.orderListData)
             this.pagination = {
               total: res.result.total,
               current: res.result.current,

+ 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>

+ 3 - 3
src/views/shipment-details/addShipDetDrawer.vue

@@ -108,7 +108,7 @@
               :columns="columns"
               :data-source="syShippingDetailsItemList"
               :pagination="false"
-              :scroll="{ x: 1500,y:500 }"
+              :scroll="{ x: 1500, y: 500 }"
               size="small"
             >
               <!-- 款号 输入框 :rules="rules.itemNumber" -->
@@ -610,7 +610,7 @@ export default {
         val[i]['orderRemainingQuantity'] = val[i].surplusNum
         val[i]['salesUnitPrice'] = val[i].unitPriceIncludingTax
         val[i]['customerOrder'] = val[i].customerOrderNumber
-        val[i]['shipmentQuantity'] = val[i].surplusNum //订单剩余数量 赋值给发货数量
+        val[i]['shipmentQuantity'] = val[i].surplusNum // 订单剩余数量 赋值给发货数量
       }
       this.msgFormSon = val
       this.syShippingDetailsItemList = this.msgFormSon
@@ -646,7 +646,7 @@ export default {
             this.$message.success('新增成功')
             console.log('新增的对象', newObj)
             this.close()
-            //清空信息
+            // 清空信息
             newObj = {}
             newObj.syShippingDetailsItemList = []
             this.fatherList() // 调用父组件 查询方法

+ 4 - 45
src/views/shipment-details/editShipDetDrawer.vue

@@ -6,7 +6,6 @@
       <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 禁用  -->
@@ -54,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>
@@ -311,13 +268,16 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
+
 import ReferOrderDataModal from '@views/shipment-details/referOrderDataModal.vue'
+
 import { editById } from '@api/document/shipmentList'
 
 export default {
   name: 'EditShipDetDrawer', // 编辑 发运明细 抽屉
   mixins: [JeecgListMixin], //
   components: { JEllipsis, ReferOrderDataModal, moment }, // 参照订单数据 弹框
+
   data() {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
     return {
@@ -660,7 +620,7 @@ export default {
     },
     // 编辑 保存
     editSave() {
-      console.log('提交编辑、刷新发运明细列表')
+      // console.log('提交编辑、刷新发运明细列表')
       editById(this.editShipDet).then(res => {
         if (res.success) {
           this.$message.success('编辑成功')
@@ -714,7 +674,6 @@ export default {
 
       this.syShippingDetailsItemList.push(addrow)
     },
-    // --------------------------------------
     // 操作 删除
     handleDelete(index) {
       console.log('index', index)

+ 134 - 0
src/views/shipment-details/itemNumEleModal.vue

@@ -0,0 +1,134 @@
+<template>
+  <!-- 维护款号成分 -- 发运明细 -->
+  <a-modal
+    title="维护款号成分"
+    v-model="itemNumEleModVis"
+    :confirmLoading="confirmLoading"
+    width="76%"
+    @ok="save"
+    @cancel="handleCancel"
+  >
+    <a-card :bordered="false">
+      <div class="table-page-search-wrapper">
+        <!-- :rules="validatorRules" -->
+        <a-form-model layout="inline" ref="form" :model="editItemNumber">
+          <a-row :gutter="24">
+            <a-col :md="6" :sm="8">
+              <!-- required 必填项 disabled 禁用  -->
+              <a-form-model-item label="款号" prop="itemNumber">
+                <a-input placeholder="请输入款号" v-model="editItemNumber.itemNumber"></a-input>
+              </a-form-model-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="物料成分" prop="materialComposition">
+                <a-input placeholder="请输入物料成分" v-model="editItemNumber.materialComposition"></a-input>
+              </a-form-model-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="是否做TC证书" prop="isTc">
+                <a-select v-model="editItemNumber.isTc">
+                  <a-select-option value="">请选择</a-select-option>
+                  <a-select-option value="1">是</a-select-option>
+                  <a-select-option value="0">否</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <!-- 页面底部保存取消 -->
+    <div
+      :style="{
+        position: 'absolute',
+        right: 0,
+        bottom: 0,
+        width: '100%',
+        borderTop: '1px solid #e9e9e9',
+        padding: '10px 16px',
+        background: '#fff',
+        textAlign: 'right',
+        zIndex: 1
+      }"
+    >
+      <a-popconfirm title="确定放弃维护款号成分吗?" @confirm="handleCancel" okText="确定" cancelText="取消">
+        <a-button :style="{ marginRight: '8px' }">取消</a-button>
+      </a-popconfirm>
+      <a-button type="primary" @click="save">
+        保存
+      </a-button>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+
+import { addItemNumEle } from '@api/document/shipmentList'
+
+export default {
+  name: 'ItemNumEleModal', // 维护款号成分
+  mixins: [JeecgListMixin],
+  components: { JEllipsis },
+
+  data() {
+    return {
+      loading: false, // 表格加载
+      confirmLoading: false,
+      itemNumEleModVis: false,
+      editItemNumber: {} // 编辑维护款号成分
+    }
+  },
+  // 接收父组件 方法
+  props: {
+    fatherList: {
+      type: Function,
+      default: null
+    }
+  },
+
+  methods: {
+    // 保存
+    save() {
+      addItemNumEle(this.editItemNumber).then(res => {
+        if (res.success) {
+          this.$message.success('维护款号成分成功')
+          this.close()
+          this.fatherList() // 调用父组件 重新渲染列表页数据显示
+        }
+      })
+    },
+    // 取消
+    cancel() {
+      this.itemNumEleModVis = false
+      this.close()
+    },
+    handleCancel() {
+      this.close()
+    },
+    close() {
+      this.$emit('close')
+      this.itemNumEleModVis = false
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+@import '~@assets/less/overwriter.less';
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+
+// /deep/ th.replacecolor {
+//   background-color: #ccc;
+// }
+</style>

+ 7 - 1
src/views/shipment-details/referOrderDataModal.vue

@@ -138,6 +138,13 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
+
+         {
+          title: '存货编码',
+          dataIndex: 'inventoryCode',
+          width: 220,
+          className: 'replacecolor'
+        },
         {
           title: '存货名称',
           dataIndex: 'inventoryName',
@@ -442,7 +449,6 @@ export default {
       return {
         onChange: (selectedRowKeys, selectedRows) => {
           console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
-          
         },
         getCheckboxProps: record => ({
           props: {

+ 78 - 40
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">
@@ -125,6 +125,10 @@
                 <a @click="edit(record)">编辑</a>
               </a-menu-item>
 
+              <a-menu-item>
+                <a href="javascript:void(0);" @click="itemNumberElement(record)">维护款号成分</a>
+              </a-menu-item>
+
               <a-menu-item>
                 <a-popconfirm title="确定提交吗?" ok-text="是" cancel-text="否" @confirm="submit(record)">
                   <a href="javascript:void(0);" style="color:green;">提交</a>
@@ -136,6 +140,10 @@
                   <a href="javascript:void(0);" style="color:red;">删除</a>
                 </a-popconfirm>
               </a-menu-item>
+
+              <!-- <a-menu-item>
+                <a href="javascript:void(0);" @click="itemNumberElement(record)">维护款号成分</a>
+              </a-menu-item> -->
             </a-menu>
 
             <!-- 已提交 且 推送成功   -->
@@ -203,6 +211,9 @@
       <detailsShipDet-drawer ref="detailsShipDetDrawer" @ok="modalFormOk"></detailsShipDet-drawer>
       <!-- 申报要素 弹框 -->
       <declareElements-modal ref="declareElementsModal"></declareElements-modal>
+
+      <!-- 维护款号成分 -->
+      <itemNumEle-modal ref="itemNumEleModal" :fatherList="getShipmentList"></itemNumEle-modal>
     </div>
   </div>
 </template>
@@ -216,6 +227,7 @@ import addShipDetDrawer from '@views/shipment-details/addShipDetDrawer.vue'
 import detailsShipDetDrawer from '@views/shipment-details/detailsShipDetDrawer.vue'
 import editShipDetDrawer from '@views/shipment-details/editShipDetDrawer.vue'
 import declareElementsModal from '@views/shipment-details/declareElementsModal.vue'
+import itemNumEleModal from '@views/shipment-details/itemNumEleModal.vue'
 
 import {
   shipmentList,
@@ -240,7 +252,8 @@ export default {
     declareElementsModal,
     cancelSubmitShipment,
     pushShipment,
-    rePushShipment
+    rePushShipment,
+    itemNumEleModal
   },
 
   data() {
@@ -308,6 +321,12 @@ export default {
           width: 180,
           className: 'replacecolor'
         },
+        {
+          title: '物料成分',
+          dataIndex: 'materialComposition',
+          width: 180,
+          className: 'replacecolor'
+        },
         {
           title: '预发货日期',
           dataIndex: 'preDeliveryDate',
@@ -365,19 +384,21 @@ export default {
           className: 'replacecolor'
         },
         {
-          title: '工厂单价(采购/委外单价)',
+          // (采购/委外单价)
+          title: '工厂单价',
           dataIndex: 'factoryUnitPrice',
           width: 120,
           className: 'replacecolor'
         },
+        // {
+        //   title: '申报要素(单证维护)',
+        //   dataIndex: 'declarationElements',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
         {
-          title: '申报要素(单证维护)',
-          dataIndex: 'declarationElements',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '套装件数(存货自定义项)',
+          // (存货自定义项)
+          title: '套装件数',
           dataIndex: 'numberOfSets',
           width: 120,
           className: 'replacecolor'
@@ -387,27 +408,27 @@ export default {
           dataIndex: 'isTc',
           width: 90,
           customRender: function(text) {
-            if (text == '0') {
+            if (text === '0') {
               return '否'
             }
-            if (text == '1') {
+            if (text === '1') {
               return '是'
             }
           },
           className: 'replacecolor'
         },
-        {
-          title: 'HScode',
-          dataIndex: 'hsCode',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '中文品名',
-          dataIndex: 'chineseName',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: 'HScode',
+        //   dataIndex: 'hsCode',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '中文品名',
+        //   dataIndex: 'chineseName',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '成衣工厂',
@@ -421,7 +442,12 @@ export default {
           width: 90,
           className: 'replacecolor'
         },
-
+        {
+          title: '账套',
+          dataIndex: 'account',
+          width: 90,
+          className: 'replacecolor'
+        },
         {
           title: '推送结果',
           dataIndex: 'pushState',
@@ -499,7 +525,11 @@ export default {
     //  申报要素
     declareElements(record) {
       this.$refs.declareElementsModal.declareElementsModVis = true
-      queryDeclarationElements({ hsCode: record.hsCode, id: record.id }).then(res => {
+      queryDeclarationElements({
+        inventoryName: record.inventoryName,
+        itemNumber: record.itemNumber,
+        account: record.account
+      }).then(res => {
         if (res.success) {
           console.log('申报要素主子表数据', res.result)
           // console.log('申报要素子表数据', res.result.syDeclarationElementsItemList)
@@ -509,7 +539,27 @@ export default {
         }
       })
     },
+    //  维护款号成分
+    itemNumberElement(record) {
+      this.$refs.itemNumEleModal.itemNumEleModVis = true
+
+      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
@@ -524,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)
@@ -637,6 +674,7 @@ export default {
       this.queryParam.salesman = ''
       this.queryParam.itemNumber = ''
       this.queryParam.refer = ''
+      this.queryParam.is = ''
       this.getShipmentList() // 渲染 发运明细列表
     },
 
@@ -664,6 +702,6 @@ export default {
 //   background-color: #ccc;
 // }
 /deep/ .ant-form-item {
-  margin-bottom: 0 !important;
+  // margin-bottom: 0 !important;
 }
 </style>