浏览代码

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

zengtx 2 年之前
父节点
当前提交
49227e7b7a

+ 22 - 27
src/views/reportForms/dye-loss-table.vue

@@ -158,14 +158,13 @@ export default {
         cvenName: '', //供应商
         planLotNumber: '', //计划单号
         csocode: '', //销售订单号
-        pageNo: '1' // 初始页
-        // pageSize: '10' // 为了显示数据总计数
+        pageNo: '' //  点击的页数
       },
       // 分页
       pagination: {
-        total: 0,
-        current: 0,
-        pageSize: 0
+        // total: '', //总条数
+        // current: '', //当前页
+        // pageSize: '' //一页多少
       },
       cvenNameArr: [], //供应商数组 chart
       cinvNameArr: [], //物料名称数组chart
@@ -196,36 +195,30 @@ export default {
     // 分页查询 染损列表
     getdyeLossList() {
       this.$nextTick(() => {
-        console.log('111')
         dyeLossList(this.queryParam).then(res => {
-          console.log('查询接口调成')
-          console.log(res.result)
+          // console.log(res.result)
           if (res.success) {
-            console.log('333')
             this.dyeLossRateData = res.result.records
             console.log('染损列表', this.dyeLossRateData)
-            console.log('染损列表cvenName', this.dyeLossRateData.cinvCode)
-            // 分页信息赋值
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
               pageSize: res.result.size
             }
-            console.log('this.pagination:', this.pagination)
-            console.log('res.result.total', res.result.total)
+            console.log('分页器赋值:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
           }
         })
       })
     },
-    // 分页、排序、筛选变化时触发
+    // 分页变化时触发
     handleTableChange(pagination, filters, sorter) {
-      console.log('当前页信息>>>>', pagination)
+      console.log('分页器信息>>>>', pagination)
       if (Object.keys(sorter).length > 0) {
         this.isorter.column = sorter.field
         this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
       }
       this.queryParam.pageNo = pagination.current
-      console.log('this.queryParam.pageNo', this.queryParam.pageNo)
+      // console.log('this.queryParam.pageNo', this.queryParam.pageNo)
       this.getdyeLossList()
     },
     // 查询按钮
@@ -248,17 +241,19 @@ export default {
     },
     // 合计行 TODO: table 单元格合并
     totalFooterShow(data) {
-      console.log('需合计数据(合计行)data', data)
-      return (
-        <a-table
-          rowKey={Math.random}
-          bordered={false}
-          pagination={false}
-          columns={this.dyeLossRateColumns}
-          dataSource={this.dyeLossRateDataSource || []}
-          showHeader={false}
-        ></a-table>
-      )
+      if (data) {
+        console.log('需合计数据(合计行)data', data)
+        return (
+          <a-table
+            rowKey={Math.random}
+            bordered={false}
+            pagination={false}
+            columns={this.dyeLossRateColumns}
+            dataSource={this.dyeLossRateDataSource || []}
+            showHeader={false}
+          ></a-table>
+        )
+      }
     }
   },
   computed: {

+ 6 - 20
src/views/reportForms/fabric-loss-table/purchaseInQuantityModal.vue

@@ -14,14 +14,14 @@
         <a-form layout="inline" @keyup.enter.native="searchQuery">
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
-              <a-form-item label="下游委外订单号">
-                <a-input placeholder="请输入下游委外订单号" v-model="queryParam.downAboardorderNum"></a-input>
+              <a-form-item label="委外订单号">
+                <a-input placeholder="请输入委外订单号" v-model="queryParam.aboardorderNum"></a-input>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
-              <a-form-item label="委外订单号">
-                <a-input placeholder="请输入委外订单号" v-model="queryParam.aboardorderNum"></a-input>
+              <a-form-item label="下游委外订单号">
+                <a-input placeholder="请输入下游委外订单号" v-model="queryParam.downAboardorderNum"></a-input>
               </a-form-item>
             </a-col>
 
@@ -77,15 +77,8 @@ export default {
       // 表头
       purchaseInQuantityColumns: [
         {
-          title: '下游委外订单号',
-          dataIndex: 'DownAboardOrderNo',
-          width: 120,
-          key: '',
-          className: 'replacecolor'
-        },
-        {
-          title: '下游供应商',
-          dataIndex: 'downSupplier',
+          title: '批号',
+          dataIndex: '',
           width: 120,
           key: '',
           className: 'replacecolor'
@@ -104,13 +97,6 @@ export default {
           key: '',
           className: 'replacecolor'
         },
-        {
-          title: '使用数量',
-          dataIndex: 'usageQuantity',
-          width: 120,
-          key: '',
-          className: 'replacecolor'
-        },
         {
           title: '单个物料成本',
           dataIndex: 'costPerMaterial',

+ 33 - 26
src/views/shipment-details/addShipDetDrawer.vue

@@ -115,17 +115,23 @@
                 </a-form-model-item>
               </a-col> -->
 
-              <!-- <a-col :md="6" :sm="8">
+              <a-col :md="6" :sm="8">
                 <a-form-model-item label="中文品名" prop="chineseName">
                   <a-input placeholder="请输入中文品名" v-model="addShipDet.chineseName"></a-input>
                 </a-form-model-item>
               </a-col>
-
+          
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="英文品名" prop="englishName">
-                  <a-input placeholder="请输入英文品名" v-model="addShipDet.englishName"></a-input>
+                <a-form-model-item label="英文品名" prop="englishProductName">
+                  <a-input placeholder="请输入英文品名" v-model="addShipDet.englishProductName"></a-input>
                 </a-form-model-item>
-              </a-col> -->
+              </a-col> 
+
+                 <a-col :md="6" :sm="8">
+                <a-form-model-item label="报关品名" prop="declarationName">
+                  <a-input placeholder="请输入报关品名" v-model="addShipDet.declarationName"></a-input>
+                </a-form-model-item>
+              </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="成衣工厂" prop="garmentFactory">
@@ -238,17 +244,17 @@
                 </a-form-model-item>
               </template>
                 <!-- 中文品名 :rules="rules.chineseName"-->
-               <template slot="chineseName" slot-scope="text, record, index">
+               <!-- <template slot="chineseName" slot-scope="text, record, index">
                 <a-form-model-item prop="chineseName">
                   <a-input style="width:100%" type="text" v-model="record.chineseName" />
                 </a-form-model-item>
-              </template>
+              </template> -->
                 <!-- 英文品名 :rules="rules.englishName"-->
-               <template slot="englishName" slot-scope="text, record, index">
+               <!-- <template slot="englishName" slot-scope="text, record, index">
                 <a-form-model-item prop="englishName">
                   <a-input style="width:100%" type="text" v-model="record.englishName" />
                 </a-form-model-item>
-              </template>
+              </template> -->
 
               <!-- 操作 -->
               <template slot="operationSlot" slot-scope="text, record, index">
@@ -319,7 +325,7 @@ export default {
       columns: [
         {
           title: '账套',
-          dataIndex: 'pkOrg',
+          dataIndex: 'account',
           width: 80,
           fixed: 'left',
           className: 'replacecolor'
@@ -568,21 +574,21 @@ export default {
           scopedSlots: { customRender: 'declarationElements' },
           className: 'replacecolor'
         },
-         {
-          title: '中文品名',
-          dataIndex: 'chineseName',
-          width: 160,
-          scopedSlots: { customRender: 'chineseName' },
-          className: 'replacecolor'
-        },
+        //  {
+        //   title: '中文品名',
+        //   dataIndex: 'chineseName',
+        //   width: 160,
+        //   scopedSlots: { customRender: 'chineseName' },
+        //   className: 'replacecolor'
+        // },
         
-        {
-          title: '英文品名',
-          dataIndex: 'englishName',
-          width: 160,
-          scopedSlots: { customRender: 'englishName' },
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '英文品名',
+        //   dataIndex: 'englishName',
+        //   width: 160,
+        //   scopedSlots: { customRender: 'englishName' },
+        //   className: 'replacecolor'
+        // },
         {
           title: '价格备注',
           dataIndex: 'priceRemarks',
@@ -663,10 +669,11 @@ export default {
       // newObj.factoryUnitPrice = this.addShipDet.factoryUnitPrice
       // newObj.declarationElements = this.addShipDet.declarationElements
       // newObj.numberOfSets = this.addShipDet.numberOfSets
-      // newObj.chineseName = this.addShipDet.chineseName
-      // newObj.englishName = this.addShipDet.englishName
+       newObj.chineseName = this.addShipDet.chineseName
+       newObj.englishProductName = this.addShipDet.englishProductName
        newObj.garmentFactory = this.addShipDet.garmentFactory
        newObj.hsCode = this.addShipDet.hsCode
+       newObj.declarationName = this.addShipDet.declarationName
       // newObj.customsDeclarationUnitPrice = this.addShipDet.customsDeclarationUnitPrice
 
       newObj.memo = this.addShipDet.memo // U8系统适用

+ 35 - 5
src/views/shipment-details/declareElementsModal.vue

@@ -1,4 +1,5 @@
 <template>
+<!-- 申报要素 -->
   <div id="declareElementsModal">
     <!-- @ok="onSubmit"      keyboard="{false}"
       destroyOnClose="{true}"
@@ -16,6 +17,13 @@
         <div class="table-page-search-wrapper">
           <a-form-model layout="inline" ref="form" :model="declareElements">
             <a-row :gutter="24">
+
+             <a-col :md="6" :sm="8" style="display: none;">
+                <a-form-model-item label="ID" prop="id">
+                  {{ declareElements.id }}
+                </a-form-model-item>
+              </a-col>
+
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="报关品名" prop="declarationName">
                   {{ declareElements.declarationName }}
@@ -81,8 +89,8 @@
               </template>
 
               <!-- 操作 -->
-              <span slot="operationSlot" slot-scope="text, record">
-                <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
+              <span slot="operationSlot" slot-scope="text, record, index">
+                <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(index)">
                   <a href="javascript:void(0);" style="color:red;">删除</a>
                 </a-popconfirm>
               </span>
@@ -120,6 +128,7 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
+import { syDeclarationElementsAdd } from '@api/document/shipmentList'
 
 export default {
   name: 'DeclareElementsModal', // 报关要素
@@ -133,6 +142,7 @@ export default {
       loading: false, // 表格加载
       // 子表表头
       declareElementsColumns: [
+      
         {
           title: '序号',
           width: 30,
@@ -145,7 +155,7 @@ export default {
           dataIndex: 'typeValue',
           width: 80,
           scopedSlots: { customRender: 'typeValueSlot' },
-          customRender: t => ellipsis(t),
+          // customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
         {
@@ -153,7 +163,7 @@ export default {
           dataIndex: 'describeText',
           width: 80,
           scopedSlots: { customRender: 'describeText' },
-          customRender: t => ellipsis(t),
+        
           className: 'replacecolor'
         },
 
@@ -190,13 +200,33 @@ export default {
     // 报关要素 保存
     addSave() {
       console.log('点击报关要素对话框 保存')
-      // var newChild = {} // 新增子表
+      var newObj = {} // 新增主表
+      newObj.id = this.declareElements.id
+      newObj.declarationName = this.declareElements.declarationName //报关品名
+      newObj.hsCode = this.declareElements.hsCode //报关品名
+      newObj.englishProductName = this.declareElements.englishProductName //英文品名
+      // 新增子表
+      newObj.syDeclarationElementsItemList = this.declareElementsData
       // newDeclareElement.documentNo = this.addShipDet.documentNo // 单据号
+      syDeclarationElementsAdd(newObj).then(res => {
+          if (res.success) {
+            this.$message.success('新增成功')
+            console.log('新增的对象', newObj)
+            this.close()
+        
+          }
+        })
       this.close()
       // 刷新
     },
     handletypeValue(e) {
       console.log('类型下拉菜单click', e)
+    },
+     // 操作 删除
+    handleDelete(index) {
+      console.log('index', index)
+      console.log('删除报关要素数据', index)
+      return this.declareElementsData.splice(index, 1)
     },
     close() {
       this.$emit('close')

+ 17 - 31
src/views/shipment-details/shipmentList.vue

@@ -24,29 +24,7 @@
                 />
               </a-form-item>
             </a-col>
-            <!-- <a-col :md="6" :sm="8">
-              <a-form-item label="开始时间">
-                <a-date-picker
-                  placeholder="请选择开始时间"
-                  format="YYYY-MM-DD"
-                  style="width: 100%"
-                  v-model="queryParam.startTime"
-                  @change="startTimeChange"
-                />
-              </a-form-item>
-            </a-col> -->
 
-            <!-- <a-col :md="6" :sm="8">
-              <a-form-item label="结束时间" style="width:100%;">
-                <a-date-picker
-                  placeholder="请选择结束时间"
-                  format="YYYY-MM-DD"
-                  style="width: 100%"
-                  v-model="queryParam.endTime"
-                  @change="endTimeChange"
-                />
-              </a-form-item>
-            </a-col> -->
             <a-col :md="6" :sm="8">
               <a-form-item label="预发货日期">
                 <a-date-picker
@@ -104,7 +82,7 @@
         <a-button type="primary" @click.stop="addShipDet" icon="plus">新增</a-button>
       </div>
 
-      <!-- 子表  :row-key="record => record.id"-->
+      <!-- 子表  :row-key="record => record.id"  :pagination="ipagination-->
       <a-table
         v-if="shipmentListData"
         bordered
@@ -112,7 +90,7 @@
         :columns="shipmentListColumns"
         :data-source="shipmentListData"
         :loading="loading"
-        :pagination="ipagination"
+        :pagination="pagination"
         :scroll="{ x: 1500 }"
         @change="handleTableChange"
       >
@@ -479,14 +457,13 @@ export default {
         salesman: '',
         itemNumber: '', // 款号
         refer: '',
-        pageNo: '', // 初始页
-        pageSize: '-1' // 为了显示数据总计数
+        pageNo: '' // 点击的页数
       },
       // 分页
       pagination: {
-        total: '',
-        current: 0,
-        pageSize: 0
+        // total: '',
+        // current: 0,
+        // pageSize: 0
       },
       dateFormat: 'YYYY-MM-DD'
     }
@@ -502,17 +479,26 @@ export default {
           if (res.success) {
             this.shipmentListData = res.result.records
             console.log('发运明细列表', this.shipmentListData)
-            // 分页信息赋值
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
               pageSize: res.result.size
             }
+            console.log('分页器赋值:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
           }
         })
       })
     },
-
+    // 分页变化时触发
+    handleTableChange(pagination, filters, sorter) {
+      console.log('分页器信息', pagination)
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field
+        this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
+      }
+      this.queryParam.pageNo = pagination.current
+      this.getShipmentList()
+    },
     // 查询按钮
     searchQuery() {
       this.getShipmentList()