Browse Source

报表-生产进度报表-详情页---> 回显完成(物料卡未开始)

liangy 3 năm trước cách đây
mục cha
commit
bff82221d0

+ 2 - 3
src/api/reportForms/pro-progress-report.js

@@ -5,7 +5,7 @@ import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
 const proProgressList = params => getAction('/productionScheduleReport/productionSchedule/list', params)
 
 // 销售订单详情
-// const salesOrderAll = params => getAction('', params)
+const salesOrderDetails = params => getAction('/productionScheduleReport/productionSchedule/getView', params)
 
 // 出入库详细数据  --- 弹框
 // const outInDetailData = params => getAction('', params)
@@ -16,8 +16,7 @@ const proProgressList = params => getAction('/productionScheduleReport/productio
 //  订单号   装箱单-面料
 // const detailsFabric = params => getAction('', params)
 
-
 // 获取图片
 const getImg = params => getAction('/productionScheduleReport/productionSchedule/selectPicture', params)
 
-export { proProgressList, getImg }
+export { proProgressList, getImg, salesOrderDetails }

+ 78 - 2
src/field/reportForms/pro-progress-report.md

@@ -6,11 +6,11 @@ csocode 销售订单号
 
 planCode 计划单号
 
-cCusName 客户 (暂未使用到)
+ccusName 客户 (暂未使用到)
 
 cdefine12 成衣加工厂
 
-cInvCode 存货编码 (暂未使用到)
+cinvCode 物料编码
 
 cInvName 存货名称
 
@@ -43,3 +43,79 @@ iKPMoney 累计开票金额
 pictureId 图片 id
 
 picture 图片流
+
+## 详情 采购
+
+cPOID 采购订单号
+
+cVenName 供应商名称
+
+cInvCode 存货编码
+
+cInvName 存货名称
+
+iNatUnitPrice  单价(本币)
+
+iQuantityLrp 计划数量(lrp)
+
+iQuantity 数量
+
+iReceivedQTY 累计入库数量
+
+iInvQTY 累计开票数量
+
+iInvMoney 累计开票金额
+
+csocode 下游订单
+
+useQTY 使用数量
+
+surplusQty 余料
+
+## 委外
+
+accId 账套
+
+cCode 委外订单号
+
+cVenName 供应商名称  供应商
+
+cInvCode 物料编码
+
+cInvName 存货名称   物料名称
+
+color 颜色
+
+cFree4 门幅
+
+iUnitPrice 单价(原币)
+
+iNatUnitPrice 单价(本币)
+
+iQuantityLrp 计划数量
+
+iQuantity 数量
+
+iReceivedQTY 累计入库数量
+
+iInvQTY 累计开票数量
+
+iInvMoney 累计开票金额
+
+csocode 下游订单
+
+iMaterialSendQty 使用数量
+
+surplusQty 余料
+
+cInvCodeZi 子件编码
+
+cInvNameZi 子件名称
+
+iQuantityZi 子件应领数量
+
+iSendQTY 子件已领数量
+
+costZi 成本
+
+purchaseCode 采购订单号

+ 14 - 14
src/views/reportForms/pro-progress-report.vue

@@ -8,7 +8,7 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="销售订单号">
-                <a-input placeholder="请输入订单号" v-model="queryParam.CSOCode"></a-input>
+                <a-input placeholder="请输入销售订单号" v-model="queryParam.CSOCode"></a-input>
               </a-form-item>
             </a-col>
 
@@ -114,6 +114,7 @@
         </span>
       </a-table>
     </a-card>
+
     <!-- 单个订单报表 抽屉 -->
     <salesOrderDetails-drawer ref="salesOrderDetailsDrawer" @ok="modalFormOk"></salesOrderDetails-drawer>
   </div>
@@ -142,7 +143,7 @@ export default {
       proProgressColumns: [
         {
           title: '销售订单号',
-          width: 210,
+          width: 310,
           fixed: 'left',
           align: 'left',
           dataIndex: 'csocode',
@@ -166,7 +167,7 @@ export default {
           dataIndex: 'cdefine12',
           className: 'replacecolor'
         },
-        { title: '物料编号(多个分行显示)', width: 220, dataIndex: 'what', className: 'replacecolor' },
+        { title: '物料编码', width: 220, dataIndex: 'cinvCode', className: 'replacecolor' },
         {
           title: '物料名称',
           width: 320,
@@ -174,8 +175,8 @@ export default {
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
-        { title: '款号', width: 100, dataIndex: 'itemNumber', className: 'replacecolor' },
-        { title: '颜色', width: 200, dataIndex: 'color', customRender: t => ellipsis(t), className: 'replacecolor' },
+        { title: '款号', width: 160, dataIndex: 'itemNumber', className: 'replacecolor' },
+        { title: '颜色', width: 220, dataIndex: 'color', customRender: t => ellipsis(t), className: 'replacecolor' },
         // {
         //   title: '创建时间',
         //   dataIndex: 'createTime',
@@ -195,13 +196,13 @@ export default {
           className: 'replacecolor'
         },
         { title: '订单数量', width: 180, dataIndex: 'iquantity', className: 'replacecolor' },
-        { title: '单价(原币)', width: 120, dataIndex: 'icostsum', className: 'replacecolor' },
-        { title: '总额(原币)', width: 120, dataIndex: 'totalSum', className: 'replacecolor' },
-        { title: '单价(本币)', width: 160, dataIndex: 'bbPrice', className: 'replacecolor' },
-        { title: '总额(本币)', width: 120, dataIndex: 'inatSum', className: 'replacecolor' },
-        { title: '实际发票成本', width: 160, dataIndex: 'itaxUnitPrice', className: 'replacecolor' },
+        { title: '单价(原币)', width: 180, dataIndex: 'itaxUnitPrice', className: 'replacecolor' },
+        { title: '总额(原币)', width: 140, dataIndex: 'totalSum', className: 'replacecolor' },
+        { title: '单价(本币)', width: 180, dataIndex: 'bbPrice', className: 'replacecolor' },
+        { title: '总额(本币)', width: 140, dataIndex: 'inatSum', className: 'replacecolor' },
+        { title: '实际发票成本', width: 160, dataIndex: 'icostsum', className: 'replacecolor' },
         { title: '已出库数量', width: 160, dataIndex: 'foutquantity', className: 'replacecolor' },
-        { title: '累计开票数量', width: 160, dataIndex: 'ikpquantity', className: 'replacecolor' },
+        { title: '累计开票数量', width: 180, dataIndex: 'ikpquantity', className: 'replacecolor' },
         {
           title: '图片',
           width: 90,
@@ -260,11 +261,10 @@ export default {
       return {
         on: {
           click: event => {
-            // console.log('【列表页 -- 销售订单号】', record)
             this.$refs.salesOrderDetailsDrawer.visible = true
             this.$refs.salesOrderDetailsDrawer.record = record //接口参数,获取(主表 + 所有页签信息)
             this.$refs.salesOrderDetailsDrawer.getDetails()
-            console.log('【列表页 点击的销售订单对象】', this.$refs.salesOrderDetailsDrawer.record)
+            // console.log('【列表页 点击的销售订单对象】', this.$refs.salesOrderDetailsDrawer.record)
           }
         }
       }
@@ -305,7 +305,7 @@ export default {
     },
     // 查询条件 订单日期转换成字符串并赋值
     onDateChange(value, dateString) {
-      this.queryParam.dDate = dateString
+      this.queryParam.DDate = dateString
       this.queryParam.DPreDateBT = dateString
     }
   }

+ 1 - 1
src/views/reportForms/pro-progress-report/outInDetailDataDrawer.vue

@@ -241,7 +241,7 @@ export default {
     // 查询出入库详细数据
     getoutInDetailData() {
       this.$nextTick(() => {
-        console.log('出入库详情', this.record)
+        // console.log('出入库详情', this.record)
         // outInDetailData({}).then(res => {
         //   if (res.success) {
         //     console.log('出入库详细数据', res.result)

+ 94 - 99
src/views/reportForms/pro-progress-report/salesOrderDetailsDrawer.vue

@@ -21,18 +21,18 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-item label="客户">
-                  {{ salesOrderMain.cCusName }}
+                  {{ salesOrderMain.ccusName }}
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="8">
-                <a-form-item label="物料编">
-                  {{ salesOrderMain.todo }}
+                <a-form-item label="物料编">
+                  {{ salesOrderMain.cinvCode }}
                 </a-form-item>
               </a-col>
 
-              <a-col :md="6" :sm="8">
+              <a-col :md="12" :sm="12">
                 <a-form-item label="物料名称">
-                  {{ salesOrderMain.CInvName }}
+                  {{ salesOrderMain.cinvName }}
                 </a-form-item>
               </a-col>
 
@@ -49,6 +49,7 @@
               </a-col>
               <a-col :md="6" :sm="8">
                 <a-form-item label="交期">
+                  <!-- TODO:日期 -->
                   {{ salesOrderMain.dpreDateBT }}
                 </a-form-item>
               </a-col>
@@ -61,7 +62,7 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-item label="单价(原币)">
-                  {{ salesOrderMain.icostsum }}
+                  {{ salesOrderMain.itaxUnitPrice }}
                 </a-form-item>
               </a-col>
 
@@ -78,7 +79,7 @@
               </a-col>
               <a-col :md="6" :sm="8">
                 <a-form-item label="总额(本币)">
-                  {{ salesOrderMain.iNatSum }}
+                  {{ salesOrderMain.inatSum }}
                 </a-form-item>
               </a-col>
 
@@ -96,7 +97,7 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-item label="累计开票数量">
-                  {{ salesOrderMain.iKPQuantity }}
+                  {{ salesOrderMain.ikpquantity }}
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="8">
@@ -123,13 +124,13 @@
             bordered
             rowKey="id"
             :loading="loading"
-            :columns="purchaseColumns"
-            :data-source="purchaseData"
+            :columns="CaiGouColumns"
+            :data-source="CaiGouData"
             :pagination="false"
             :scroll="{ x: 1500 }"
           >
-            <!-- 物料编 -->
-            <span slot="materialNum" slot-scope="text">
+            <!-- 物料编 -->
+            <span slot="cinvCode" slot-scope="text">
               <a>{{ text }}</a>
             </span>
           </a-table>
@@ -142,13 +143,13 @@
             bordered
             rowKey="id"
             :loading="loading"
-            :columns="outsourceColumns"
-            :data-source="outsourceData"
+            :columns="weiwaiColumns"
+            :data-source="weiwaiData"
             :pagination="false"
             :scroll="{ x: 1500 }"
           >
-            <!-- 物料编 弹框-->
-            <span slot="materialNum" slot-scope="text">
+            <!-- 物料编 弹框-->
+            <span slot="cinvCode" slot-scope="text">
               <a>{{ text }}</a>
             </span>
           </a-table>
@@ -201,8 +202,8 @@
             bordered
             rowKey="id"
             :loading="loading"
-            :columns="materialCardColumns"
-            :data-source="materialCardData"
+            :columns="cardColumns"
+            :data-source="cardData"
             :pagination="false"
             :scroll="{ x: 1500 }"
           >
@@ -232,7 +233,7 @@ import moment from 'moment'
 import outInDetailDataDrawer from '@views/reportForms/pro-progress-report/outInDetailDataDrawer.vue'
 import packinglistFabricsDrawer from '@views/reportForms/pro-progress-report/packinglistFabricsDrawer.vue' //装箱单-面料(查看详情)
 
-// import { salesOrderAll } from '@api/reportForms/pro-progress-report.js'
+import { salesOrderDetails } from '@api/reportForms/pro-progress-report.js'
 
 export default {
   name: 'salesOrderDetailsDrawer', // 销售订单详情
@@ -243,7 +244,8 @@ export default {
       loading: false, // 表格加载
       visible: false, // 单个订单报表 抽屉
       salesOrderMain: [], // 主表信息
-      record: {}, //点击的销售订单对象(参数)
+      record: {}, //点击CaiGouData的销售订单对象(参数)
+
       // 物料卡 查询条件
       queryParam: {
         pageNo: '', // 初始页
@@ -253,94 +255,83 @@ export default {
       },
 
       // 采购 表头
-      purchaseColumns: [
-        { title: '账套信息', width: 120, dataIndex: 'accountSetInfo', fixed: 'left', className: 'replacecolor' },
+      CaiGouColumns: [
+        { title: '账套信息', width: 120, dataIndex: 'accId', fixed: 'left', className: 'replacecolor' },
         {
           title: '采购订单号',
           width: 160,
-          dataIndex: 'purchaseOrderNum',
+          dataIndex: 'cpoid',
           fixed: 'left',
           className: 'replacecolor'
         },
-        { title: '供应商', width: 120, dataIndex: 'supplier', className: 'replacecolor' },
         {
-          title: '物料编',
+          title: '物料编',
           width: 120,
-          dataIndex: 'materialNum',
+          dataIndex: 'cinvCode',
           className: 'replacecolor',
           fixed: 'left',
-          customCell: this.materialNumCustomCell,
-          scopedSlots: { customRender: 'materialNum' }
-        },
-        { title: '单价(本币)', width: 100, dataIndex: 'priceLocal', className: 'replacecolor' },
-        { title: '物料名称', width: 210, dataIndex: 'materialName', className: 'replacecolor' },
-        { title: '计划数量(LRP)', width: 160, dataIndex: 'planQuantity', className: 'replacecolor' },
-        { title: '订单数量', width: 120, dataIndex: 'orderQuantity', className: 'replacecolor' },
-        { title: '累计入库数量', width: 140, dataIndex: 'accumulativeInQuantity', className: 'replacecolor' },
-        { title: '累计开票数量', width: 140, dataIndex: 'invoicesCumulativeNum', className: 'replacecolor' },
-        { title: '累计开票金额', width: 140, dataIndex: 'cumulativeInvoiceAmount', className: 'replacecolor' },
-        { title: '下游订单', width: 160, dataIndex: 'downstreamOrder', className: 'replacecolor' },
-        { title: '使用数量', width: 140, dataIndex: 'usageQuantity', className: 'replacecolor' },
-        { title: '余料', width: 100, dataIndex: 'oddments', fixed: 'right', className: 'replacecolor' }
-      ],
-      purchaseData: [
-        {
-          accountSetInfo: '宁波森语',
-          purchaseOrderNum: 'SYA525-林辉',
-          supplier: '林辉',
-          materialNum: '0501000315',
-          priceLocal: '0.353',
-          materialName: '4.5CM黑色橡胶丝进口橡筋',
-          planQuantity: '21879.84',
-          orderQuantity: '21879.84',
-          accumulativeInQuantity: '21879'
+          customCell: this.cinvCodeCustomCell,
+          scopedSlots: { customRender: 'cinvCode' }
         },
-        {},
-        {}
+        { title: '供应商', width: 220, dataIndex: 'cvenName', className: 'replacecolor' },
+
+        { title: '单价(本币)', width: 140, dataIndex: 'inatUnitPrice', className: 'replacecolor' },
+        { title: '物料名称', width: 210, dataIndex: 'cinvName', className: 'replacecolor' },
+        { title: '计划数量(LRP)', width: 160, dataIndex: 'iquantityLrp', className: 'replacecolor' },
+        { title: '订单数量', width: 180, dataIndex: 'iquantity', className: 'replacecolor' },
+        { title: '累计入库数量', width: 140, dataIndex: 'ireceivedQTY', className: 'replacecolor' },
+        { title: '累计开票数量', width: 140, dataIndex: 'iinvQTY', className: 'replacecolor' },
+        { title: '累计开票金额', width: 140, dataIndex: 'iinvMoney', className: 'replacecolor' },
+        { title: '下游订单', width: 160, dataIndex: 'csocode', className: 'replacecolor' },
+        { title: '使用数量', width: 140, dataIndex: 'useQTY', className: 'replacecolor' },
+        { title: '余料', width: 100, dataIndex: 'surplusQty', fixed: 'right', className: 'replacecolor' }
       ],
+      CaiGouData: [],
 
       // 委外 表头
-      outsourceColumns: [
+      weiwaiColumns: [
         {
           title: '委外订单号',
           width: 120,
-          dataIndex: 'purchaseAboardOrderNum',
+          dataIndex: 'ccode',
           fixed: 'left',
           className: 'replacecolor'
         },
-        { title: '供应商', width: 120, dataIndex: 'supplier', fixed: 'left', className: 'replacecolor' },
+        { title: '供应商', width: 220, dataIndex: 'cvenName', fixed: 'left', className: 'replacecolor' },
         {
-          title: '物料编',
+          title: '物料编',
           width: 120,
-          dataIndex: 'materialNum',
+          dataIndex: 'cinvCode',
           fixed: 'left',
           className: 'replacecolor',
-          customCell: this.materialNumCustomCell,
-          scopedSlots: { customRender: 'materialNum' }
+          customCell: this.cinvCodeCustomCell,
+          scopedSlots: { customRender: 'cinvCode' }
         },
-        { title: '物料名称', width: 210, dataIndex: 'materialName', className: 'replacecolor' },
-        { title: '颜色', width: 120, dataIndex: 'color', className: 'replacecolor' },
-        { title: '门幅', width: 120, dataIndex: 'larghezza', className: 'replacecolor' },
-        { title: '单价(本币/原币)', width: 140, dataIndex: 'price', className: 'replacecolor' },
-        { title: '计划数量(LRP)', width: 160, dataIndex: 'planQuantity', className: 'replacecolor' },
-        { title: '订单数量', width: 120, dataIndex: 'orderQuantity', className: 'replacecolor' },
-        { title: '累计入库数量', width: 140, dataIndex: 'accumulativeInQuantity', className: 'replacecolor' },
-        { title: '累计开票数量', width: 140, dataIndex: 'invoicesCumulativeNum', className: 'replacecolor' },
-        { title: '累计开票金额', width: 140, dataIndex: 'cumulativeInvoiceAmount', className: 'replacecolor' },
-        { title: '下游订单', width: 160, dataIndex: 'downstreamOrder', className: 'replacecolor' },
-        { title: '使用数量', width: 140, dataIndex: 'usageQuantity', className: 'replacecolor' },
-        { title: '余下库存', width: 100, dataIndex: 'remainingInventory', className: 'replacecolor' },
-        { title: '子件编号', width: 100, dataIndex: 'childNum', className: 'replacecolor' },
-        { title: '子件名称', width: 100, dataIndex: 'childName', className: 'replacecolor' },
-        { title: '子件应领数量', width: 140, dataIndex: 'receivedcdQuantity', className: 'replacecolor' },
-        { title: '子件已领数量', width: 140, dataIndex: 'cdHadQuantity', className: 'replacecolor' },
-        { title: '子件总成本', width: 140, dataIndex: 'cdTotalCost', className: 'replacecolor' },
-        { title: '采购订单号', width: 160, dataIndex: 'purchaseOrderNum', fixed: 'right', className: 'replacecolor' }
+        { title: '物料名称', width: 320, dataIndex: 'cinvName', className: 'replacecolor' },
+        { title: '颜色', width: 180, dataIndex: 'color', className: 'replacecolor' },
+        { title: '门幅', width: 120, dataIndex: 'cfree4', className: 'replacecolor' },
+        { title: '单价(本币)', width: 140, dataIndex: 'inatUnitPrice', className: 'replacecolor' },
+        { title: '单价(原币)', width: 140, dataIndex: 'iunitPrice', className: 'replacecolor' },
+        { title: '计划数量(LRP)', width: 160, dataIndex: 'iquantityLrp', className: 'replacecolor' },
+        { title: '订单数量', width: 160, dataIndex: 'iquantity', className: 'replacecolor' },
+        { title: '累计入库数量', width: 140, dataIndex: 'ireceivedQTY', className: 'replacecolor' },
+        { title: '累计开票数量', width: 140, dataIndex: 'iinvQTY', className: 'replacecolor' },
+        { title: '累计开票金额', width: 140, dataIndex: 'iinvMoney', className: 'replacecolor' },
+        { title: '下游订单', width: 160, dataIndex: 'csocode', className: 'replacecolor' },
+        { title: '使用数量', width: 140, dataIndex: 'imaterialSendQty', className: 'replacecolor' },
+
+        { title: '余下库存(余料)', width: 140, dataIndex: 'surplusQty', className: 'replacecolor' },
+        { title: '子件编号', width: 140, dataIndex: 'cinvCodeZi', className: 'replacecolor' },
+        { title: '子件名称', width: 320, dataIndex: 'cinvNameZi', className: 'replacecolor' },
+        { title: '子件应领数量', width: 140, dataIndex: 'iquantityZi', className: 'replacecolor' },
+        { title: '子件已领数量', width: 140, dataIndex: 'isendQTY', className: 'replacecolor' },
+        { title: '子件总成本', width: 140, dataIndex: 'costZi', className: 'replacecolor' },
+        { title: '采购订单号', width: 160, dataIndex: 'purchaseCode', fixed: 'right', className: 'replacecolor' }
       ],
-      outsourceData: [{ materialNum: 'N0201000666' }, {}],
+      weiwaiData: [],
 
       // 物料卡 表头
-      materialCardColumns: [
+      cardColumns: [
         {
           title: '计划单号',
           width: 140,
@@ -369,37 +360,36 @@ export default {
         { title: 'what5', width: 140, dataIndex: 'what5', className: 'replacecolor' },
         { title: '备注', width: 210, dataIndex: 'note', fixed: 'right', className: 'replacecolor' }
       ],
-      materialCardData: [{}, {}]
+      cardData: []
     }
   },
   created() {
     this.getDetails()
   },
   methods: {
-    // 销售订单所有详情
+    // 销售订单详情
     getDetails() {
       this.$nextTick(() => {
-        console.log('销售订单号', this.record.csocode)
-        console.log('计划单号', this.record.planCode)
-        console.log('款号', this.record.itemNumber)
-        // console.log('物料编码', this.record.csocode)
-        // salesOrderAll({
-        //   csocode: this.record.csocode,
-        //   planCode: this.record.planCode,
-        //   itemNumber: this.record.itemNumber,
-        //   todo: this.record.todo
-        // }).then(res => {
-        //   if (res.success) {
-        //     console.log('销售订单详情返回所有数据', res.result)
-        //     this.salesOrderMain = res.result.record //主表信息
-        //     // 采购 委外 物料卡 信息在 res 什么地方???
-        //   }
-        // })
+        salesOrderDetails({
+          color: this.record.color,
+          itemNumber: this.record.itemNumber,
+          marCode: this.record.cinvCode,
+          planCode: this.record.planCode,
+          soCode: this.record.csocode
+        }).then(res => {
+          if (res.success) {
+            console.log('销售订单详情所有数据', res.result)
+            this.salesOrderMain = res.result //主表信息
+            this.CaiGouData = res.result.productionScheduleCaiGou //采购
+            this.weiwaiData = res.result.productionScheduleWeiWai //委外
+            this.cardData = res.result.productionScheduleWeiWai //物料卡
+          }
+        })
       })
     },
 
     // 采购、委外 【物料编号】 抽屉--打开【出入库详细数据】
-    materialNumCustomCell(record) {
+    cinvCodeCustomCell(record) {
       return {
         on: {
           click: event => {
@@ -461,4 +451,9 @@ export default {
 /deep/ .ant-drawer-body {
   padding: 10px;
 }
+
+// 回显label文字
+/deep/.ant-form-item-label > label {
+  font-weight: 700;
+}
 </style>

+ 0 - 1
src/views/shipment-details/shipmentList.vue

@@ -563,7 +563,6 @@ export default {
     submit(record) {
       console.log('点击id:', record.id)
       this.$nextTick(() => {
-        //TODO: 缺少参数 提交类型
         submitShipment({ id: record.id, type: '1' }).then(res => {
           if (res.success) {
             console.log('提交成功,单据状态改为【已提交】')