ソースを参照

fix: 类型展示

zh 2 年 前
コミット
55d39519d9

+ 58 - 7
src/components/LogisticsTabs/index.vue

@@ -165,6 +165,16 @@ export default {
             label: '所属销售公司类型',
             prop: 'belongCompanyType',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { belongCompanyType } = row
+            const typeObj = {
+              GE_JIANG: '格匠',
+              GUANG_ZHOU: '广州销售公司',
+              FO_SHAN: '佛山销售公司',
+              OTHER: '其他销售公司'
+            }
+            return <div>{typeObj[belongCompanyType]}</div>
           }
         },
         {
@@ -214,6 +224,10 @@ export default {
             label: '是否已经对过帐',
             prop: 'isAccountChecking',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isAccountChecking } = row
+            return <div>{+isAccountChecking ? '是' : '否'}</div>
           }
         },
         {
@@ -221,6 +235,10 @@ export default {
             label: '是否已经审核',
             prop: 'isAudit',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isAudit } = row
+            return <div>{+isAudit ? '是' : '否'}</div>
           }
         },
         {
@@ -228,6 +246,10 @@ export default {
             label: '是否完结',
             prop: 'isFinish',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isFinish } = row
+            return <div>{+isFinish ? '已经完结' : '未完结'}</div>
           }
         },
         {
@@ -235,6 +257,10 @@ export default {
             label: '实际是否卸货',
             prop: 'isRealUnload',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isRealUnload } = row
+            return <div>{+isRealUnload ? '是' : '否'}</div>
           }
         },
         {
@@ -242,6 +268,10 @@ export default {
             label: '实际是否上楼',
             prop: 'isRealUpstairs',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isRealUpstairs } = row
+            return <div>{+isRealUpstairs ? '是' : '否'}</div>
           }
         },
         {
@@ -249,6 +279,10 @@ export default {
             label: '是否卸货',
             prop: 'isUnload',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isUnload } = row
+            return <div>{+isUnload ? '是' : '否'}</div>
           }
         },
         {
@@ -256,6 +290,10 @@ export default {
             label: '是否上楼',
             prop: 'isUpstairs',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isUpstairs } = row
+            return <div>{+isUpstairs ? '是' : '否'}</div>
           }
         },
         {
@@ -326,6 +364,15 @@ export default {
             label: '订单类型',
             prop: 'orderType',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { orderType } = row
+            const typeObj = {
+              TOB: '商家机工程机类型',
+              ALL: '所有类型,广州的订单统一 开单价',
+              TOC: '佛山销售销售订单类型公司'
+            }
+            return <div>{typeObj[orderType]}</div>
           }
         },
         {
@@ -333,6 +380,17 @@ export default {
             label: '订单类型细分',
             prop: 'orderTypeDetail',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { orderType } = row
+            const typeObj = {
+              PICKING_UP_ORDER: '前置仓提货订单',
+              SALE_ORDER: '销售订单',
+              MERCHANT_WAREHOUSE_ORDER: '商家仓订单',
+              PROJECT_ORDER: '工程机订单',
+              SALE_RETURN_ORDER: '销售退货单'
+            }
+            return <div>{typeObj[orderType]}</div>
           }
         },
         {
@@ -460,13 +518,6 @@ export default {
         },
         {
           columnAttributes: {
-            label: '条码唯一id',
-            prop: 'id',
-            width: 200
-          }
-        },
-        {
-          columnAttributes: {
             label: '物料代码',
             prop: 'materialCode',
             width: 200

+ 95 - 19
src/views/supply/pickup/components/pickup_form.vue

@@ -571,6 +571,16 @@ export default {
             label: '所属销售公司类型',
             prop: 'belongCompanyType',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { belongCompanyType } = row
+            const typeObj = {
+              GE_JIANG: '格匠',
+              GUANG_ZHOU: '广州销售公司',
+              FO_SHAN: '佛山销售公司',
+              OTHER: '其他销售公司'
+            }
+            return <div>{typeObj[belongCompanyType]}</div>
           }
         },
         {
@@ -620,6 +630,10 @@ export default {
             label: '是否已经对过帐',
             prop: 'isAccountChecking',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isAccountChecking } = row
+            return <div>{+isAccountChecking ? '是' : '否'}</div>
           }
         },
         {
@@ -627,6 +641,10 @@ export default {
             label: '是否已经审核',
             prop: 'isAudit',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isAudit } = row
+            return <div>{+isAudit ? '是' : '否'}</div>
           }
         },
         {
@@ -634,6 +652,10 @@ export default {
             label: '是否完结',
             prop: 'isFinish',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isFinish } = row
+            return <div>{+isFinish ? '已经完结' : '未完结'}</div>
           }
         },
         {
@@ -641,6 +663,10 @@ export default {
             label: '实际是否卸货',
             prop: 'isRealUnload',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isRealUnload } = row
+            return <div>{+isRealUnload ? '是' : '否'}</div>
           }
         },
         {
@@ -648,6 +674,10 @@ export default {
             label: '实际是否上楼',
             prop: 'isRealUpstairs',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isRealUpstairs } = row
+            return <div>{+isRealUpstairs ? '是' : '否'}</div>
           }
         },
         {
@@ -655,6 +685,10 @@ export default {
             label: '是否卸货',
             prop: 'isUnload',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isUnload } = row
+            return <div>{+isUnload ? '是' : '否'}</div>
           }
         },
         {
@@ -662,6 +696,10 @@ export default {
             label: '是否上楼',
             prop: 'isUpstairs',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isUpstairs } = row
+            return <div>{+isUpstairs ? '是' : '否'}</div>
           }
         },
         {
@@ -677,109 +715,147 @@ export default {
             prop: 'materialCostType',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '产品名称',
             prop: 'materialName',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '规格型号',
             prop: 'materialSpecification',
             width: 350
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '物料类型',
             prop: 'materialType',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '商家编码',
             prop: 'merchantCode',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '商家名称',
             prop: 'merchantName',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '订单号',
             prop: 'orderCode',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '订单时间',
             prop: 'orderDate',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '订单类型',
             prop: 'orderType',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { orderType } = row
+            const typeObj = {
+              TOB: '商家机工程机类型',
+              ALL: '所有类型,广州的订单统一 开单价',
+              TOC: '佛山销售销售订单类型公司'
+            }
+            return <div>{typeObj[orderType]}</div>
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '订单类型细分',
             prop: 'orderTypeDetail',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { orderType } = row
+            const typeObj = {
+              PICKING_UP_ORDER: '前置仓提货订单',
+              SALE_ORDER: '销售订单',
+              MERCHANT_WAREHOUSE_ORDER: '商家仓订单',
+              PROJECT_ORDER: '工程机订单',
+              SALE_RETURN_ORDER: '销售退货单'
+            }
+            return <div>{typeObj[orderType]}</div>
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '收货送货地址',
             prop: 'receiptAddress',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '退货单号',
             prop: 'returnOrderCode',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '补贴结算系数',
             prop: 'subsidyCoefficient',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '嘉贤创建时间',
             prop: 'time',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '费用汇总',
             prop: 'totalCost',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '单价计算',
             prop: 'unitPrice',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '卸货上楼结算系数',
             prop: 'unloadUpstairsCoefficient',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '上楼卸货费用',
             prop: 'unloadUpstairsCost',
             width: 200
           }
-        },{
+        },
+        {
           columnAttributes: {
             label: '发货仓库编码',
             prop: 'warehouseCode',
@@ -792,7 +868,7 @@ export default {
             prop: 'warehouseName',
             width: 200
           }
-        },
+        }
       ]
     },
     formOutbound() {

+ 104 - 45
src/views/supply/transferOrder/transferOrderForm.vue

@@ -303,11 +303,11 @@ export default {
             label: '调拨数量',
             prop: 'qty'
           },
-          render: (h, { column, row, index }) => {
+          render: (h, { row, index }) => {
             return (
-              <div style='margin:0 20px'>
+              <div style="margin:0 20px">
                 <el-input
-                  type='number'
+                  type="number"
                   disabled={this.comDisabled}
                   value={row.qty}
                   // onInput={e => (row.qty = e)}
@@ -315,8 +315,8 @@ export default {
                     row.qty = value
                     this.debounceChange(value, index)
                   }}
-                  placeholder='调拨数量'
-                  size='mini'
+                  placeholder="调拨数量"
+                  size="mini"
                 ></el-input>
               </div>
             )
@@ -327,15 +327,15 @@ export default {
             label: '备注',
             prop: 'notes'
           },
-          render: (h, { column, row, index }) => {
+          render: (h, { row }) => {
             return (
               <el-input
-                type='text'
+                type="text"
                 value={row.notes}
                 disabled={this.comDisabled}
                 onInput={e => (row.notes = e)}
-                placeholder='备注'
-                size='mini'
+                placeholder="备注"
+                size="mini"
               ></el-input>
             )
           }
@@ -351,13 +351,13 @@ export default {
             label: '操作',
             prop: ''
           },
-          render: (h, { column, row, index }) => {
+          render: (h, { index }) => {
             return (
               <div>
                 {!this.comDisabled ? (
                   <el-button
-                    type='text'
-                    size='default'
+                    type="text"
+                    size="default"
                     onClick={() => {
                       this.handleDel(index)
                     }}
@@ -376,29 +376,29 @@ export default {
         ...[
           !this.comDisabled
             ? {
-              name: 'slot-component',
-              md: 24,
-              attributes: { disabled: false },
-              formItemAttributes: { label: '', prop: '' },
-              render: (h, { props, onInput }) => {
-                return (
-                  <div>
-                    <el-button
-                      size='mini'
-                      onClick={() => {
-                        this.visible = true
-                        this.recordSelected = []
-                      }}
-                    >
+                name: 'slot-component',
+                md: 24,
+                attributes: { disabled: false },
+                formItemAttributes: { label: '', prop: '' },
+                render: () => {
+                  return (
+                    <div>
+                      <el-button
+                        size="mini"
+                        onClick={() => {
+                          this.visible = true
+                          this.recordSelected = []
+                        }}
+                      >
                         添加
-                    </el-button>
-                    <el-button size='mini' onClick={() => this.handleAllDel()}>
+                      </el-button>
+                      <el-button size="mini" onClick={() => this.handleAllDel()}>
                         删除
-                    </el-button>
-                  </div>
-                )
+                      </el-button>
+                    </div>
+                  )
+                }
               }
-            }
             : {}
         ],
         {
@@ -406,7 +406,7 @@ export default {
           md: 24,
           attributes: { disabled: false },
           formItemAttributes: { label: '', prop: '' },
-          render: (h, { props, onInput }) => {
+          render: (h, { props }) => {
             var { value } = props
             return (
               <zj-table
@@ -435,6 +435,16 @@ export default {
             label: '所属销售公司类型',
             prop: 'belongCompanyType',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { belongCompanyType } = row
+            const typeObj = {
+              GE_JIANG: '格匠',
+              GUANG_ZHOU: '广州销售公司',
+              FO_SHAN: '佛山销售公司',
+              OTHER: '其他销售公司'
+            }
+            return <div>{typeObj[belongCompanyType]}</div>
           }
         },
         {
@@ -484,6 +494,10 @@ export default {
             label: '是否已经对过帐',
             prop: 'isAccountChecking',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isAccountChecking } = row
+            return <div>{+isAccountChecking ? '是' : '否'}</div>
           }
         },
         {
@@ -491,6 +505,10 @@ export default {
             label: '是否已经审核',
             prop: 'isAudit',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isAudit } = row
+            return <div>{+isAudit ? '是' : '否'}</div>
           }
         },
         {
@@ -498,6 +516,10 @@ export default {
             label: '是否完结',
             prop: 'isFinish',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isFinish } = row
+            return <div>{+isFinish ? '已经完结' : '未完结'}</div>
           }
         },
         {
@@ -505,6 +527,10 @@ export default {
             label: '实际是否卸货',
             prop: 'isRealUnload',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isRealUnload } = row
+            return <div>{+isRealUnload ? '是' : '否'}</div>
           }
         },
         {
@@ -512,6 +538,10 @@ export default {
             label: '实际是否上楼',
             prop: 'isRealUpstairs',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isRealUpstairs } = row
+            return <div>{+isRealUpstairs ? '是' : '否'}</div>
           }
         },
         {
@@ -519,6 +549,10 @@ export default {
             label: '是否卸货',
             prop: 'isUnload',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isUnload } = row
+            return <div>{+isUnload ? '是' : '否'}</div>
           }
         },
         {
@@ -526,6 +560,10 @@ export default {
             label: '是否上楼',
             prop: 'isUpstairs',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { isUpstairs } = row
+            return <div>{+isUpstairs ? '是' : '否'}</div>
           }
         },
         {
@@ -596,6 +634,15 @@ export default {
             label: '订单类型',
             prop: 'orderType',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { orderType } = row
+            const typeObj = {
+              TOB: '商家机工程机类型',
+              ALL: '所有类型,广州的订单统一 开单价',
+              TOC: '佛山销售销售订单类型公司'
+            }
+            return <div>{typeObj[orderType]}</div>
           }
         },
         {
@@ -603,6 +650,17 @@ export default {
             label: '订单类型细分',
             prop: 'orderTypeDetail',
             width: 200
+          },
+          render: (h, { row }) => {
+            const { orderType } = row
+            const typeObj = {
+              PICKING_UP_ORDER: '前置仓提货订单',
+              SALE_ORDER: '销售订单',
+              MERCHANT_WAREHOUSE_ORDER: '商家仓订单',
+              PROJECT_ORDER: '工程机订单',
+              SALE_RETURN_ORDER: '销售退货单'
+            }
+            return <div>{typeObj[orderType]}</div>
           }
         },
         {
@@ -807,11 +865,11 @@ export default {
           md: 24,
           attributes: { disabled: false },
           formItemAttributes: { label: '', prop: '' },
-          render: (h, { props, onInput }) => {
+          render: (h, { props }) => {
             var { value } = props
             return (
               <zj-table
-                style='height: 600px;'
+                style="height: 600px;"
                 tableAttributes={{ ...this.defaultTableAttributes }}
                 isDrop={true}
                 columns={this.formLogistics}
@@ -859,7 +917,7 @@ export default {
     }
   },
   methods: {
-    debounceChange: debounce(function(val, index) {
+    debounceChange: debounce(function (val, index) {
       if (val <= 0) {
         this.selectData[index].qty = 1
       } else {
@@ -872,7 +930,7 @@ export default {
       return getcustomerFrontList(...p)
     },
     // 表格列解析渲染数据更改
-    columnParsing(item, defaultData) {
+    columnParsing(defaultData) {
       return defaultData
     }, // 监听勾选变化
     selectionChange(data) {
@@ -881,7 +939,7 @@ export default {
     itemSelectionChange(data) {
       this.itemRecordSelected = data
     },
-    selectable(row, index) {
+    selectable(row) {
       if (this.selectData.length) {
         for (let j = 0; j < this.selectData.length; j++) {
           if (row.id === this.selectData[j].disabledId) {
@@ -997,7 +1055,7 @@ export default {
       this.$refs.pageRef &&
         this.$refs.pageRef.$children[0].$children[0].$children[2].$children[0].$children[0].clearSelection()
     },
-    handleChange(e, type) {
+    handleChange(e) {
       if (e) {
         this.formData.transferCustomerName = e
         this.formData.transferCustomerNumber = e
@@ -1027,7 +1085,9 @@ export default {
             return
           }
         }
-        const transfer = this.sonCustomerList.find(k => k.id === (this.formData.transferCustomerNumber || this.formData.transferCustomerName))
+        const transfer = this.sonCustomerList.find(
+          k => k.id === (this.formData.transferCustomerNumber || this.formData.transferCustomerName)
+        )
         console.log(transfer, 999)
         if (valid) {
           const params = {
@@ -1035,16 +1095,15 @@ export default {
             orders: this.selectData,
             transferCustomerNumber: transfer.number,
             transferCustomerName: transfer.name
-
           }
           if (this.moduleType === 1) {
             params.status = type
-            addCustomerTransfer(params).then(res => {
+            addCustomerTransfer(params).then(() => {
               this.$successMsg(type === 'SAVE' ? '保存成功' : '新增成功')
               this.handlerefreshList()
             })
           } else {
-            updateCustomerTransfer(params).then(res => {
+            updateCustomerTransfer(params).then(() => {
               this.$successMsg('编辑成功')
               this.handlerefreshList()
             })
@@ -1059,7 +1118,7 @@ export default {
       examineCustomerTransfer({
         id: this.detailsId,
         status: type
-      }).then(res => {
+      }).then(() => {
         this.$successMsg('审核成功')
         this.handlerefreshList()
       })
@@ -1068,7 +1127,7 @@ export default {
       setNeExamine({
         id: this.detailsId,
         status: type
-      }).then(res => {
+      }).then(() => {
         this.$successMsg('反审成功')
         this.handlerefreshList()
       })