Explorar o código

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie %!s(int64=3) %!d(string=hai) anos
pai
achega
e9495c2c72

+ 9 - 0
src/api/financialManagement/paymentRequest.js

@@ -130,3 +130,12 @@ export function deleteDetail(data) {
   })
 }
 
+// 账单明细删除
+export function removeDetail(data) {
+  return request({
+    url: '/api/trade-finance/acc/remove',
+    method: 'post',
+    params: data
+  })
+}
+

+ 4 - 4
src/components/basic-container/main.vue

@@ -9,11 +9,11 @@
         <slot></slot>
       </div>
       <div v-if="showBtn" class="basic-container-foot" @click="show = !show" @mouseenter="enter" @mouseleave="leave">
-        <div v-show="show">
-          <i class="el-icon-caret-top" /><span v-show="showSpan">隐藏</span>
+        <div v-show="show" style="height: 20px">
+          <span class="el-button--text"><i class="el-icon-caret-top" /><span v-show="showSpan">隐藏</span></span>
         </div>
-        <div v-show="!show">
-          <i class="el-icon-caret-bottom" /><span v-show="showSpan">显示</span>
+        <div v-show="!show" style="height: 20px">
+          <span class="el-button--text"><i class="el-icon-caret-bottom" /><span v-show="showSpan">显示</span></span>
         </div>
       </div>
     </el-card>

+ 2 - 1
src/components/crop-select/configuration/mainList.json

@@ -16,12 +16,13 @@
             "prop": "code",
             "index": 1,
             "width":100,
+          "search": true,
           "overHidden": true
         },{
             "label": "名称",
             "prop": "cname",
             "search": true,
-            "searchSpan": 16,
+            "searchSpan": 8,
             "index": 2,
             "width":180,
         "overHidden": true

+ 5 - 3
src/components/finance/financialAccount.vue

@@ -500,9 +500,9 @@
         this.submitButton = true
         const itemsList = this.data.map(item => {
           item.corpId = this.corpId;
-          item.tradeType = this.billData.optionType?this.billData.optionType: item.tradeType
-          item.srcType = this.srcType
-          return item
+          item.tradeType = this.billData.optionType?this.billData.optionType: item.tradeType;
+          item.srcType = item.srcType? item.srcType: this.srcType;
+          return item;
         })
         const params = {
           url: this.checkData.url,
@@ -520,6 +520,7 @@
             if(res.data.success){
               this.$message.success("操作成功!")
               this.$emit("choceFun");
+              this.$emit("submit")
               //跳转付款申请页面
 
               // if(this.$store.getters.pqStatus){
@@ -548,6 +549,7 @@
             if(res.data.success){
               this.$message.success("操作成功!")
               this.$emit("choceFun");
+              this.$emit("submit")
             }
           }).finally(()=>{
             this.submitButton = false

+ 1 - 0
src/page/index/top/top-notice.vue

@@ -121,6 +121,7 @@ export default {
           path: row.url,
           query: {params:row.parameter},
         });
+        // this.$router.push({name:'委托',params:row.parameter})
       }
       getMsgDetail(row.id).then(res=>{
         this.$set(row,"isRead",res.data.data.isRead)

+ 0 - 1
src/views/approval/processConfig/index.vue

@@ -418,7 +418,6 @@ export default {
         item.levelId = _.add(item.$index,1)
         delete item.id
         if (item.auditMoldId) {
-          console.log(item.auditMoldId)
           item.auditMoldId = item.auditMoldId.join(',');
         }
         if (item.auditUserId) {

+ 1 - 1
src/views/approveData/configuration/mainList.json

@@ -113,7 +113,7 @@
     },
     {
       "label": "申请人",
-      "prop": "sendName",
+      "prop": "sendRealName",
       "overHidden": true,
       "search": true,
       "index": 7,

+ 38 - 65
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -174,7 +174,7 @@
               <el-select
                 v-if="row.$cellEdit"
                 v-model="row.purchaseAmount"
-                @focus="changeContractAmt(row)"
+                @change="changeContractAmt(row)"
                 allow-create
                 filterable
                 v-input-limit="2"
@@ -364,25 +364,6 @@
         </span>
     </el-dialog>
 
-    <el-dialog
-      title="账单"
-      append-to-body
-      class="el-dialogDeep"
-      :visible.sync="applyPaymentDialog"
-      width="60%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false"
-      v-dialog-drag
-    >
-      <apply-payment
-        :billType="billType"
-        :billData="billData"
-        itemType="采购"
-        @choceFun="choceFun"
-      >
-      </apply-payment>
-    </el-dialog>
 
     <el-dialog
       append-to-body
@@ -396,11 +377,13 @@
       v-dialog-drag
     >
       <financial-account
+        v-if="financialAccountDialog"
         :billType="billType"
         :billData="{}"
         :arrList="applyPaymentList"
         :checkData="financeData"
         @choceFun="choceFun"
+        @submit="feeSubmit"
       >
       </financial-account>
     </el-dialog>
@@ -884,13 +867,13 @@ export default {
       detail(id).then(res => {
         this.form = res.data.data;
         this.browse = this.form.status > 0? true: false
-        this.contactsData = this.form.itemsVOList? this.form.itemsVOList: []
+        this.contactsData = this.form.orderItemsList? this.form.orderItemsList: []
         this.advantageProjectData = this.form.orderFeesList? this.form.orderFeesList: []
         this.bankOfDepositData = this.form.orderFilesList? this.form.orderFilesList: []
-        if (!this.form.itemsVOList) {
+        if (!this.form.orderItemsList) {
           this.contactsData = []
         } else {
-          this.contactsData = this.form.itemsVOList
+          this.contactsData = this.form.orderItemsList
         }
         // if (!this.form.orderFeesList) {
         //   this.advantageProjectData = []
@@ -926,7 +909,7 @@ export default {
         })
         this.goodsConfiguration.dicData = [].concat(goodsData)
         this.removeGoodsRepeat()
-        delete this.form.itemsVOList
+        delete this.form.orderItemsList
         delete this.form.orderFeesList
         delete this.form.orderFilesList
         // delete this.form.corpsName
@@ -1485,34 +1468,36 @@ export default {
         checkType: 'ffsq'
       }
       this.contactsData.map(e => {
-        const form = {
-          belongCompany: this.form.belongCompany,
-          srcOrderno:this.form.orderNo,
-          itemType:"采购",
-          corpsName:this.form.corpsName,
-          corpId:this.form.corpId,
-          srcParentId: this.form.id,
-          currency: 'CNY',
-          exchangeRate: '1',
-          taxRate: '0',
-          accDate: this.form.businesDate,
-          srcType: 1, // 1.采购or销售主表货款申请 2. 采购or销售-费用明细申请  3.收发货-费用明细
-          tradeType: 'GN',
-          optionType: 'GN',
-          amount: e.amount,
-          goodName: e.cname,
-          price: e.price,
-          unit: e.unit,
-          quantity: e.orderQuantity,
-          srcFeesId: e.id,
-          costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+        if (e.submitPay != 1) {
+          const form = {
+            belongCompany: this.form.belongCompany,
+            srcOrderno:this.form.orderNo,
+            itemType:"采购",
+            corpsName:this.form.corpsName,
+            corpId:this.form.corpId,
+            srcParentId: this.form.id,
+            currency: 'CNY',
+            exchangeRate: '1',
+            taxRate: '0',
+            accDate: this.form.businesDate,
+            srcType: 1, // 1.采购or销售主表货款申请 2. 采购or销售-费用明细申请  3.收发货-费用明细
+            tradeType: 'GN',
+            optionType: 'GN',
+            amount: e.amount,
+            goodName: e.cname,
+            price: e.purchaseAmount,
+            unit: e.unit,
+            quantity: e.orderQuantity,
+            srcFeesId: e.id,
+            costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+          }
+          arr.push(form)
         }
-        arr.push(form)
       })
-      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 2)
+      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 2 && item.submitPay != 1)
       getFeeList.forEach(item => {
         let form = {
-          srcOrderno:this.form.orgOrderNo,
+          srcOrderno:this.form.orderNo,
           itemType:"采购",
           corpsName:item.corpName,
           corpId: item.corpId,
@@ -1549,28 +1534,16 @@ export default {
     },
     //申请货款
     applyPayment(type){
-      // if (contrastObj(this.form, this.oldForm) ||
-      //   contrastList(this.contactsData, this.oldGoodsList) ||
-      //   contrastList(this.advantageProjectData, this.oldFeesList) ||
-      //   contrastList(this.bankOfDepositData, this.oldUploadList)
-      // ) {
-      //   this.$confirm("您已改动数据,是否先保存在进行操作!", {
-      //     confirmButtonText: "保存",
-      //     cancelButtonText: "取消",
-      //     type: "warning"
-      //   }).then(() => {
-      //     this.editCustomer();
-      //   })
-      // }else{
-        this.beforeBillData(true,type);
-        this.financialAccountDialog = true;
-      // }
-
+      this.beforeBillData(true,type);
+      this.financialAccountDialog = true;
     },
     //关闭账单
     choceFun(){
       this.financialAccountDialog  = false
     },
+    feeSubmit() {
+      this.queryData(this.form.id);
+    },
     //返回列表
     backToList() {
       if (contrastObj(this.form, this.oldForm) ||

+ 53 - 33
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -337,15 +337,6 @@
               ></el-input>
               <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
             </template>
-<!--            <template slot="cname" slot-scope="{ row }">-->
-<!--              <goods-select v-if="row.$cellEdit" v-model="row.cname" @getRow="getGoodsRow($event, row)"-->
-<!--                               :configuration="goodsConfiguration" @receiveList="receiveGoodList" @returnRow="getRow($event, row)"-->
-<!--                            :artsVision="form.belongToCorpId"-->
-<!--              />-->
-<!--              <span v-else>-->
-<!--                {{row.cname}}-->
-<!--              </span>-->
-<!--            </template>-->
             <template slot="shopQuality" slot-scope="{ row }">
               <el-switch
                 v-model="row.shopQuality"
@@ -432,6 +423,12 @@
                   :disabled="detailData.seeDisabled || browse"
                 >导 入</el-button>
               </el-upload>
+              <el-button
+                type="warning"
+                icon="el-icon-refresh"
+                size="small"
+                @click="resetStock"
+              >库存刷新</el-button>
             </template>
           </avue-crud>
         </basic-container>
@@ -661,11 +658,13 @@
       v-dialog-drag
     >
       <financial-account
+        v-if="financialAccountDialog"
         :billType="billType"
         :billData="{}"
         :arrList="applyPaymentList"
         :belongCompany="form.belongCompany"
         @choceFun="choceFun"
+        @submit="feeSubmit"
       >
       </financial-account>
     </el-dialog>
@@ -1809,6 +1808,7 @@ export default {
     },
     // 复制新单
     copyOrder() {
+      this.saveActives = ''
       this.queryData(this.form.id, true)
     },
     getcorpId(row) {
@@ -2116,32 +2116,34 @@ export default {
       this.billType = type
       const data = this.goodsActives === 'gift'? this.contactsData: this.goodsShowData
       data.map(e => {
-        const form = {
-          belongCompany: this.form.belongCompany,
-          srcOrderno:this.form.orgOrderNo,
-          itemType:"销售",
-          corpsName:this.form.corpName,
-          corpId:this.form.corpId,
-          srcParentId: this.form.id,
-          currency: 'CNY',
-          exchangeRate: '1',
-          taxRate: '0',
-          accDate: this.form.businesDate,
-          srcType: 1,
-          tradeType: 'GN',
-          optionType: 'GN',
-          chargeMember: this.form.chargeMember,
-          amount: e.amount,
-          quantity: e.orderQuantity, // 数量
-          price: e.price,
-          unit: e.unit,
-          goodName: e.cname,
-          srcFeesId: e.id,
-          costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+        if (e.submitPay != 1) {
+          const form = {
+            belongCompany: this.form.belongCompany,
+            srcOrderno:this.form.orgOrderNo,
+            itemType:"销售",
+            corpsName:this.form.corpName,
+            corpId:this.form.corpId,
+            srcParentId: this.form.id,
+            currency: 'CNY',
+            exchangeRate: '1',
+            taxRate: '0',
+            accDate: this.form.businesDate,
+            srcType: 1,
+            tradeType: 'GN',
+            optionType: 'GN',
+            chargeMember: this.form.chargeMember,
+            amount: e.amount,
+            quantity: e.orderQuantity, // 数量
+            price: e.price,
+            unit: e.unit,
+            goodName: e.cname,
+            srcFeesId: e.id,
+            costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+          }
+          arr.push(form)
         }
-        arr.push(form)
       })
-      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 1)
+      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 1 && item.submitPay != 1)
       getFeeList.forEach(item => {
         let form = {
           srcOrderno:this.form.orgOrderNo,
@@ -2175,6 +2177,10 @@ export default {
     choceFun(){
       this.financialAccountDialog  = false
     },
+    feeSubmit() {
+      this.saveActives = ''
+      this.queryData(this.form.id);
+    },
     //商品选中触发
     productSelection(selection) {
       this.selection = selection
@@ -3468,6 +3474,20 @@ export default {
       }
       row.amount = Number(row.price) * Number(row.orderQuantity)
     },
+    // 库存刷新
+    resetStock() {
+      this.goodsShowData.forEach(item => {
+        selectGoodsNum({
+          goodsId: item.itemId,
+          itemType: item.itemType? item.itemType: item.typeno,
+          tradeType: 'GN',
+          storageId: this.form.storageId
+        }).then(res => {
+          item.storageQuantity = res.data.data
+        })
+      })
+      this.$message.success('刷新成功')
+    },
   },
   computed: {
     ...mapGetters(["userInfo", "permission"])

+ 25 - 2
src/views/financialManagement/billDetails/billDetails.vue

@@ -47,7 +47,7 @@
           icon="el-icon-delete"
           size="small"
           :disabled="scope.row.billType === '申请' ||  scope.row.settlementAmount != 0"
-          @click.stop=""
+          @click.stop="rowDel(scope.row)"
         >删除
         </el-button>
       </template>
@@ -57,7 +57,7 @@
 
 <script>
   import option from "./configuration/mainList.json";
-  import { getBillList } from "@/api/financialManagement/paymentRequest";
+  import { getBillList, removeDetail } from "@/api/financialManagement/paymentRequest";
   import _ from "lodash";
 
   export default {
@@ -201,6 +201,29 @@
           this.$refs.crud.$refs.dialogColumn.columnBox = false;
         }
       },
+      rowDel(row){
+        this.$confirm("确定删除数据?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          if (row.id) {
+            removeDetail({ids: row.id}).then(res => {
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              })
+              this.dataList.splice(row.$index, 1);
+            })
+          } else {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.dataList.splice(row.$index, 1);
+          }
+        });
+      },
     }
   }
 </script>

+ 114 - 53
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -620,44 +620,59 @@ export default {
             type: 'sum',
             decimals: 0
           }],
-        column: [
-          {
-            label: '状态',
-            width: 100,
-            type: 'select',
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
-            dataType: "string",
-            prop: 'status'
-          }, {
-            label: '车队',
-            width: 200,
-            prop: 'fleetId'
-          }, {
-            label: '货运日期',
-            type: "datetime",
-            cell: true,
-            format: 'yyyy-MM-dd HH:mm:ss',
-            valueFormat: 'yyyy-MM-dd HH:mm:ss',
-            width: 200,
-            prop: 'arrivalTime'
-          }, {
-            label: '应付陆运费',
-            cell: true,
-            prop: 'landAmountC'
-          }, {
-            label: '件数',
-            width: 100,
-            overHidden: true,
-            controls: false,
-            cell: true,
-            prop: 'quantity',
-            type: 'number',
-            precision:0
-          }
+        column: [{
+          label: '货运日期',
+          type: "datetime",
+          cell: true,
+          format: 'yyyy-MM-dd HH:mm:ss',
+          valueFormat: 'yyyy-MM-dd HH:mm:ss',
+          width: 200,
+          index: 1,
+          prop: 'arrivalTime'
+        }, {
+          label: '实际到厂时间',
+          prop: 'realArrivalTime',
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          defaultTime: ['00:00:00', '23:59:59'],
+          format: "yyyy-MM-dd HH:mm:ss",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          index:2,
+          width: 140,
+        }, {
+          label: '尺寸箱型',
+          width: 100,
+          slot: true,
+          index: 3,
+          prop: 'ctnType'
+        }, {
+          label: '箱量',
+          width: 50,
+          index: 4,
+          prop: 'ctnQuantity'
+        }, {
+          label: '车队',
+          width: 200,
+          index: 5,
+          prop: 'fleetId'
+        }, {
+          label: '货物名称',
+          overHidden: true,
+          width: 160,
+          index: 6,
+          prop: 'goods'
+        }, {
+          label: '件数',
+          width: 100,
+          overHidden: true,
+          controls: false,
+          cell: true,
+          index: 7,
+          prop: 'quantity',
+          type: 'number',
+          precision:0
+        }
           // , {
           //   label: '包装',
           //   width: 100,
@@ -672,72 +687,96 @@ export default {
           //   },
           // }
           , {
-            label: '尺码',
-            width: 100,
-            overHidden: true,
-            cell: true,
-            prop: 'size',
-          }, {
-            label: '尺寸箱型',
-            width: 100,
-            slot: true,
-            prop: 'ctnType'
-          }, {
-            label: '箱量',
-            width: 50,
-            prop: 'ctnQuantity'
-          }, {
             label: '重量',
             width: 160,
             prop: 'landWeight',
             controls: false,
             precision: 2,
+            index: 8,
             type: 'number'
           }, {
+            label: '尺码',
+            width: 100,
+            overHidden: true,
+            cell: true,
+            index: 9,
+            prop: 'size',
+          }, {
             label: '车号',
             width: 150,
+            index: 10,
             prop: 'plateNo'
           }, {
             label: '司机',
             width: 115,
+            index: 11,
             prop: 'driverName'
           }, {
             label: '电话',
             width: 160,
+            index: 12,
             prop: 'tel'
           }, {
             label: '单柜运费',
+            index: 13,
             prop: 'landAmountD'
+          },
+          {
+            label: '状态',
+            width: 100,
+            index: 14,
+            type: 'select',
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            dataType: "string",
+            prop: 'status'
+          }, {
+            label: '应付陆运费',
+            cell: true,
+            index: 15,
+            prop: 'landAmountC'
           }, {
             label: '委托备注',
             width: 245,
+            index: 16,
             prop: 'remarks'
           }, {
             label: '车队备注',
             width: 245,
+            index: 17,
             prop: 'fleetRemarks'
           }, {
             label: '司机备注',
             width: 245,
+            index: 18,
             prop: 'driverRemarks'
           }, {
             label: '应收场站费',
             width: 100,
             precision: 2,
+            index: 19,
             controls: false,
+            cell: true,
             type: 'number',
             prop: 'oneFeeD'
           }, {
             label: '应收港杂费',
             width: 100,
             precision: 2,
+            cell: true,
+            index: 20,
             controls: false,
             type: 'number',
             prop: 'twoFeeD'
           }, {
             label: '应收扣款',
             width: 100,
+            index: 21,
             precision: 2,
+            cell: true,
             controls: false,
             type: 'number',
             prop: 'threeFeeD'
@@ -745,24 +784,32 @@ export default {
             label: '应收待时费',
             width: 100,
             precision: 2,
+            index: 22,
+            cell: true,
             controls: false,
             type: 'number',
             prop: 'fourFeeD'
           }, {
             label: '应收其他',
             width: 100,
+            index: 23,
             precision: 2,
+            cell: true,
             type: 'number',
             controls: false,
             prop: 'fiveFeeD'
           }, {
             label: '应收费用备注',
             width: 245,
+            index: 24,
+            cell: true,
             prop: 'feeRemarksD'
           }, {
             label: '应付场站费',
             width: 100,
+            index: 25,
             precision: 2,
+            cell: true,
             controls: false,
             type: 'number',
             prop: 'oneFeeC'
@@ -770,33 +817,43 @@ export default {
             label: '应付港杂费',
             width: 100,
             precision: 2,
+            index: 26,
+            cell: true,
             controls: false,
             type: 'number',
             prop: 'twoFeeC'
           }, {
             label: '应付扣款',
             width: 100,
+            index: 27,
             precision: 2,
             controls: false,
             type: 'number',
+            cell: true,
             prop: 'threeFeeC'
           }, {
             label: '应付待时费',
             width: 100,
             precision: 2,
+            index: 28,
             controls: false,
+            cell: true,
             type: 'number',
             prop: 'fourFeeC'
           }, {
             label: '应付其他',
             width: 100,
             precision: 2,
+            index: 29,
             type: 'number',
+            cell: true,
             controls: false,
             prop: 'fiveFeeC'
           }, {
             label: '应付费用备注',
             width: 245,
+            index: 30,
+            cell: true,
             prop: 'feeRemarksC'
           }
         ]
@@ -1495,4 +1552,8 @@ export default {
 ::v-deep .el-form-item__content{
   line-height: 32px;
 }
+::v-deep .el-card__body {
+  padding: 10px 15px;
+  font-size: 14px;
+}
 </style>

+ 6 - 3
src/views/landTransportation/dispatchingCars/index.vue

@@ -76,6 +76,9 @@
             <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{row.addressDetail}}</div>
           </el-tooltip>
         </template>
+        <template slot="billNo" slot-scope="{row,index}">
+          <span class="el-button--text" style="cursor: pointer" @click.stop="rowCell(row,index)">{{row.billNo}}</span>
+        </template>
         <template slot-scope="{row,index}" slot="menu">
           <el-button type="text"
                      icon="el-icon-edit"
@@ -268,9 +271,9 @@ export default {
     if (this.$route.query.orderId){
       this.rowCell({id:this.$route.query.orderId},0)
     }
-    if (this.$route.query.params){
-      this.rowCell({id:this.$route.query.params},0)
-    }
+    // if (this.$route.query.params){
+    //   this.rowCell({id:this.$route.query.params},0)
+    // }
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(86), this.optionList);

+ 123 - 79
src/views/landTransportation/driver/index.vue

@@ -250,73 +250,45 @@ export default {
           width: 140,
           search: true,
         },{
-          label: '实际到厂时间',
-          prop: 'realArrivalTime',
-          overHidden: true,
-          type: "date",
-          searchRange: true,
-          defaultTime: ['00:00:00', '23:59:59'],
-          format: "yyyy-MM-dd HH:mm:ss",
-          valueFormat: "yyyy-MM-dd HH:mm:ss",
-          index: 2,
-          width: 140,
-          search: true,
-        },{
-          label: '完工日期',
-          prop: 'finishedTime',
-          overHidden: true,
-          type: "date",
-          searchRange: true,
-          defaultTime: ['00:00:00', '23:59:59'],
-          format: "yyyy-MM-dd HH:mm:ss",
-          valueFormat: "yyyy-MM-dd HH:mm:ss",
-          index:3,
-          width: 140,
-          search: true,
-        },{
           label: '货运地点',
-          index: 4,
+          index: 2,
           width: 160,
           search: true,
           prop: 'addressDetail'
         },{
           label: '提单号',
           width: 100,
-          index:5,
+          index:3,
           search: true,
           overHidden: true,
           prop: 'billNo'
         }, {
+          label: '平台号',
+          width: 100,
+          index: 4,
+          search: true,
+          overHidden: true,
+          prop: 'orderNo'
+        }, {
           label: '入货场站',
           prop: 'station',
           overHidden: true,
-          index: 6,
+          index: 5,
           width: 140,
           search: true,
-        }, {
-          label: '箱型',
-          width: 100,
+        },  {
+          label: '车队',
+          width: 200,
           search: true,
-          index: 7,
+          index:6,
           overHidden: true,
-          prop: 'ctnType',
-          type: 'select',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
-          props: {
-            label: "dictValue",
-            value: "dictValue"
-          },
-        }, {
-          label: '箱量',
-          width: 50,
-          index: 8,
-          prop: 'ctnQuantity'
+          prop: 'fleetId'
         },{
           label: '车号',
           width: 150,
           prop: 'vehicleId',
           overHidden: true,
-          index:9,
+          index:7,
           type: 'select',
           search: true,
           dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
@@ -325,16 +297,9 @@ export default {
             value: "id"
           }
         }, {
-          label: '车队',
-          width: 200,
-          search: true,
-          index:10,
-          overHidden: true,
-          prop: 'fleetId'
-        }, {
           label: '司机',
           width: 115,
-          index:11,
+          index:8,
           search: true,
           overHidden: true,
           prop: 'driverId',
@@ -347,83 +312,132 @@ export default {
         }, {
           label: '电话',
           width: 160,
-          index:12,
+          index:9,
           overHidden: true,
           search: true,
           prop: 'tel'
-        },{
-          label: '货物名称',
-          overHidden: true,
-          width: 160,
-          search: true,
-          index: 13,
-          prop: 'goods'
         }, {
           label: '箱号',
           cell: true,
           width: 245,
-          index: 14,
+          index: 10,
           overHidden: true,
           search: true,
           prop: 'ctnNo'
         },{
-          label: '制单日期',
+          label: '实际到厂时间',
+          prop: 'realArrivalTime',
           overHidden: true,
-          prop: 'createTime',
           type: "date",
           searchRange: true,
           defaultTime: ['00:00:00', '23:59:59'],
           format: "yyyy-MM-dd HH:mm:ss",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
-          index: 15,
+          index: 11,
+          width: 140
+        },{
+          label: '受理日期',
+          type: "datetime",
+          format: 'yyyy-MM-dd HH:mm:ss',
+          valueFormat: 'yyyy-MM-dd HH:mm:ss',
+          width: 200,
+          index: 12,
+          prop: 'acceptTime'
+        },{
+          label: '完工日期',
+          prop: 'finishedTime',
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          defaultTime: ['00:00:00', '23:59:59'],
+          format: "yyyy-MM-dd HH:mm:ss",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          index:13,
           width: 140,
           search: true,
         },{
-          label: '船名航次',
-          prop: 'factory',
+          label: '箱型',
+          width: 100,
+          search: true,
+          index: 14,
           overHidden: true,
+          prop: 'ctnType',
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
+          props: {
+            label: "dictValue",
+            value: "dictValue"
+          },
+        }, {
+          label: '箱量',
+          width: 50,
+          index: 15,
+          prop: 'ctnQuantity'
+        },{
+          label: '货物名称',
+          overHidden: true,
+          width: 160,
+          search: true,
           index: 16,
-          width: 140,
+          prop: 'goods'
+        }, {
+          label: '件数',
+          width: 100,
           search: true,
+          index: 17,
+          overHidden: true,
+          controls: false,
+          cell: true,
+          prop: 'quantity',
+          type: 'number',
+          precision:0
         }, {
           label: '重量(吨)',
           width: 160,
           prop: 'landWeight',
           controls: false,
           overHidden: true,
-          index: 17,
+          index: 18,
           precision: 2,
           type: 'number'
+        },{
+          label: '尺码',
+          width: 100,
+          search: true,
+          index:19,
+          overHidden: true,
+          cell: true,
+          prop: 'size',
         }, {
           label: '应付陆运费',
           overHidden: true,
-          index: 18,
+          index: 20,
           prop: 'landAmountC'
         }, {
           label: '委托备注',
           overHidden: true,
           width: 245,
-          index: 19,
+          index: 21,
           prop: 'remarks'
         }, {
           label: '车队备注',
           overHidden: true,
           width: 245,
-          index: 20,
+          index: 22,
           prop: 'fleetRemarks'
         }, {
           label: '司机备注',
           overHidden: true,
           cell: true,
           width: 245,
-          index: 21,
+          index: 23,
           prop: 'driverRemarks'
         },{
           label: '场站费',
           width: 100,
           precision: 2,
           cell: true,
-          index: 22,
+          index: 24,
           controls: false,
           type: 'number',
           prop: 'oneFeeC'
@@ -432,7 +446,7 @@ export default {
           width: 100,
           precision: 2,
           cell: true,
-          index: 23,
+          index: 25,
           controls: false,
           type: 'number',
           prop: 'twoFeeC'
@@ -441,14 +455,14 @@ export default {
           width: 100,
           precision: 2,
           cell: true,
-          index: 24,
+          index: 26,
           controls: false,
           type: 'number',
           prop: 'threeFeeC'
         }, {
           label: '待时费',
           width: 100,
-          index: 25,
+          index: 27,
           precision: 2,
           cell: true,
           controls: false,
@@ -458,7 +472,7 @@ export default {
           label: '其他',
           width: 100,
           precision: 2,
-          index: 26,
+          index: 28,
           cell: true,
           type: 'number',
           controls: false,
@@ -466,14 +480,33 @@ export default {
         }, {
           label: '费用备注',
           width: 245,
-          index: 27,
+          index: 29,
           cell: true,
           prop: 'feeRemarksC'
         },{
+          label: '制单日期',
+          overHidden: true,
+          prop: 'createTime',
+          type: "date",
+          searchRange: true,
+          defaultTime: ['00:00:00', '23:59:59'],
+          format: "yyyy-MM-dd HH:mm:ss",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          index: 30,
+          width: 140,
+          search: true,
+        },{
+          label: '船名航次',
+          prop: 'factory',
+          overHidden: true,
+          index: 31,
+          width: 140,
+          search: true,
+        },{
           label: '状态',
           width: 100,
           type: 'select',
-          index:28,
+          index:32,
           overHidden: true,
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
           props: {
@@ -544,6 +577,17 @@ export default {
     },
     //搜索
     searchChange(params, done) {
+      let data = params
+      if (params.arrivalTime) {
+        data.beginArrivalTime = params.arrivalTime[0]
+        data.endArrivalTime = params.arrivalTime[1]
+      }
+      if (params.createTime) {
+        data.beginCrateTime = params.createTime[0]
+        data.endCrateTime = params.createTime[1]
+      }
+      delete data.arrivalTime
+      delete data.createTime
       this.onLoad(this.page, params)
       done();
     },

+ 128 - 79
src/views/landTransportation/motorcadeDriver/index.vue

@@ -377,37 +377,25 @@ export default {
           overHidden: true,
           prop: 'billNo'
         }, {
-          label: '入货场站',
-          prop: 'station',
-          overHidden: true,
-          index: 4,
-          width: 140,
-          search: true,
-        }, {
-          label: '箱型',
+          label: '平台号',
           width: 100,
-          index: 5,
+          index: 4,
           search: true,
           overHidden: true,
-          prop: 'ctnType',
-          type: 'select',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
-          props: {
-            label: "dictValue",
-            value: "dictValue"
-          }
+          prop: 'orderNo'
         }, {
-          label: '箱量',
-          width: 50,
-          index: 6,
+          label: '入货场站',
+          prop: 'station',
           overHidden: true,
-          prop: 'ctnQuantity'
+          index: 5,
+          width: 140,
+          search: true,
         }, {
           label: '车号',
           width: 150,
           cell: true,
           search: true,
-          index: 7,
+          index: 6,
           allowCreate: true,
           prop: 'vehicleId',
           overHidden: true,
@@ -424,7 +412,7 @@ export default {
             label: '车队',
             width: 200,
             search: true,
-            index: 8,
+            index: 7,
             // hide:true,
             showColumn: false,
             filterable: true,
@@ -448,7 +436,7 @@ export default {
             overHidden: true,
             cell: true,
             filterable: true,
-            index: 9,
+            index: 8,
             prop: 'driverId',
             type: 'select',
             dicUrl: "/api/blade-client/land-driver/driver-list?vehicleId={{key}}",
@@ -462,19 +450,92 @@ export default {
             width: 160,
             search: true,
             cell: true,
-            index: 10,
+            index: 9,
             prop: 'tel'
           }, {
+            label: '箱号',
+            overHidden: true,
+            width: 245,
+            index: 10,
+            search: true,
+            prop: 'ctnNo'
+          },{
+            label: '实际到厂时间',
+            prop: 'realArrivalTime',
+            overHidden: true,
+            type: "date",
+            searchRange: true,
+            defaultTime: ['00:00:00', '23:59:59'],
+            format: "yyyy-MM-dd HH:mm:ss",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            index: 11,
+            width: 140
+          },{
+            label: '受理日期',
+            type: "datetime",
+            format: 'yyyy-MM-dd HH:mm:ss',
+            valueFormat: 'yyyy-MM-dd HH:mm:ss',
+            width: 200,
+            index: 12,
+            prop: 'acceptTime'
+          },{
+            label: '完工日期',
+            prop: 'finishedTime',
+            overHidden: true,
+            type: "date",
+            searchRange: true,
+            defaultTime: ['00:00:00', '23:59:59'],
+            format: "yyyy-MM-dd HH:mm:ss",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            index:13,
+            width: 140,
+            search: true,
+          }, {
+            label: '箱型',
+            width: 100,
+            index: 14,
+            search: true,
+            overHidden: true,
+            prop: 'ctnType',
+            type: 'select',
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
+          }, {
+            label: '箱量',
+            width: 50,
+            index: 15,
+            overHidden: true,
+            prop: 'ctnQuantity'
+          },{
+            label: '货物名称',
+            overHidden: true,
+            width: 160,
+            search: true,
+            index: 16,
+            prop: 'goods'
+          }, {
             label: '件数',
             width: 100,
             search: true,
-            index: 11,
+            index: 17,
             overHidden: true,
             controls: false,
             cell: true,
             prop: 'quantity',
             type: 'number',
             precision:0
+          }, {
+            label: '重量(吨)',
+            width: 160,
+            prop: 'landWeight',
+            controls: false,
+            overHidden: true,
+            index: 18,
+            precision: 2,
+            type: 'number'
           },
           // {
           //   label: '包装',
@@ -495,52 +556,10 @@ export default {
             label: '尺码',
             width: 100,
             search: true,
-            index:12,
+            index:19,
             overHidden: true,
             cell: true,
             prop: 'size',
-          },{
-            label: '货物名称',
-            overHidden: true,
-            width: 160,
-            search: true,
-            index: 13,
-            prop: 'goods'
-          }, {
-            label: '箱号',
-            overHidden: true,
-            width: 245,
-            index: 14,
-            search: true,
-            prop: 'ctnNo'
-          }, {
-            label: '制单日期',
-            overHidden: true,
-            prop: 'createTime',
-            type: "date",
-            searchRange: true,
-            defaultTime: ['00:00:00', '23:59:59'],
-            format: "yyyy-MM-dd HH:mm:ss",
-            valueFormat: "yyyy-MM-dd HH:mm:ss",
-            index: 15,
-            width: 145,
-            search: true,
-          }, {
-            label: '船名航次',
-            prop: 'factory',
-            overHidden: true,
-            index: 16,
-            width: 140,
-            search: true,
-          }, {
-            label: '重量(吨)',
-            width: 160,
-            prop: 'landWeight',
-            controls: false,
-            overHidden: true,
-            index: 17,
-            precision: 2,
-            type: 'number'
           },
           // {
           //   label: '陆运费(D)',
@@ -550,20 +569,20 @@ export default {
           {
             label: '应付陆运费',
             overHidden: true,
-            index: 18,
+            index: 20,
             width: 100,
             cell: true,
             prop: 'landAmountC'
           }, {
             label: '委托备注',
             overHidden: true,
-            index: 19,
+            index: 21,
             width: 245,
             prop: 'remarks'
           }, {
             label: '车队备注',
             cell: true,
-            index: 20,
+            index: 22,
             width: 245,
             overHidden: true,
             prop: 'fleetRemarks'
@@ -571,14 +590,14 @@ export default {
             label: '司机备注',
             overHidden: true,
             width: 245,
-            index: 21,
+            index: 23,
             prop: 'driverRemarks'
           }, {
             label: '场站费',
             width: 100,
             precision: 2,
             cell: true,
-            index: 22,
+            index: 24,
             controls: false,
             type: 'number',
             prop: 'oneFeeC'
@@ -587,7 +606,7 @@ export default {
             width: 100,
             precision: 2,
             cell: true,
-            index: 23,
+            index: 25,
             controls: false,
             type: 'number',
             prop: 'twoFeeC'
@@ -595,7 +614,7 @@ export default {
             label: '扣款',
             width: 100,
             precision: 2,
-            index: 24,
+            index: 26,
             cell: true,
             controls: false,
             type: 'number',
@@ -604,7 +623,7 @@ export default {
             label: '待时费',
             width: 100,
             precision: 2,
-            index: 25,
+            index: 27,
             cell: true,
             controls: false,
             type: 'number',
@@ -613,7 +632,7 @@ export default {
             label: '其他',
             width: 100,
             precision: 2,
-            index: 26,
+            index: 28,
             cell: true,
             type: 'number',
             controls: false,
@@ -621,15 +640,34 @@ export default {
           }, {
             label: '费用备注',
             width: 245,
-            index: 27,
+            index: 29,
             cell: true,
             prop: 'feeRemarksC'
           }, {
+            label: '制单日期',
+            overHidden: true,
+            prop: 'createTime',
+            type: "date",
+            searchRange: true,
+            defaultTime: ['00:00:00', '23:59:59'],
+            format: "yyyy-MM-dd HH:mm:ss",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            index: 30,
+            width: 145,
+            search: true,
+          }, {
+            label: '船名航次',
+            prop: 'factory',
+            overHidden: true,
+            index: 31,
+            width: 140,
+            search: true,
+          }, {
             label: '状态',
             overHidden: true,
             width: 100,
             type: 'select',
-            index: 28,
+            index: 32,
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
             props: {
               label: "dictValue",
@@ -745,6 +783,17 @@ export default {
     },
     //搜索
     searchChange(params, done) {
+      let data = params
+      if (params.arrivalTime) {
+        data.beginArrivalTime = params.arrivalTime[0]
+        data.endArrivalTime = params.arrivalTime[1]
+      }
+      if (params.createTime) {
+        data.beginCrateTime = params.createTime[0]
+        data.endCrateTime = params.createTime[1]
+      }
+      delete data.arrivalTime
+      delete data.createTime
       this.onLoad(this.page, params)
       done();
     },

+ 218 - 121
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -63,7 +63,8 @@
           />
         </template>
         <template slot-scope="scope" slot="salesman">
-          <el-select v-model="goodsForm.salesman" placeholder="请选择" :disabled="goodsForm.status !== 0">
+          <el-select v-model="goodsForm.salesman" placeholder="请选择" :disabled="goodsForm.status !== 0"
+                     @change="changeSelect">
             <el-option
                 v-for="item in salesmanList"
                 :key="item.id"
@@ -155,7 +156,7 @@
         <template slot="headerSerial" slot-scope="{column}">
           <el-tooltip class="item" effect="dark" content="录入明细" placement="top">
             <el-button type="primary" icon="el-icon-circle-plus-outline" circle size="mini"
-                       @click="$refs.crudBox.rowCellAdd({arrivalTime:goodsForm.arrivalTime})"></el-button>
+                       @click="$refs.crudBox.rowCellAdd({arrivalTime:new Date((new Date).getTime() + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(0, 19)})"></el-button>
           </el-tooltip>
         </template>
         <template slot="ctnTypeHeader" slot-scope="{column}">
@@ -570,77 +571,129 @@ export default {
             type: 'sum',
             decimals: 0
           }],
-        column: [
-          {
-            label: '状态',
-            width: 100,
-            type: 'select',
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
-            dataType: "string",
-            prop: 'status'
-          }, {
-            label: '车队',
-            width: 200,
-            prop: 'fleetName'
-          }, {
-            label: '应付陆运费',
-            cell: true,
-            prop: 'landAmountC'
-          }, {
-            label: '箱型',
-            width: 100,
-            slot: true,
-            prop: 'ctnType'
-          }, {
-            label: '箱量',
-            width: 50,
-            prop: 'ctnQuantity'
-          }, {
-            label: '重量',
-            width: 160,
-            prop: 'landWeight',
-            controls: false,
-            precision: 2,
-            type: 'number'
-          }, {
-            label: '货运日期',
-            type: "datetime",
-            format: 'yyyy-MM-dd HH:mm:ss',
-            valueFormat: 'yyyy-MM-dd HH:mm:ss',
-            width: 200,
-            prop: 'arrivalTime'
-          }, {
-            label: '车号',
-            width: 150,
-            prop: 'plateNo'
-          }, {
-            label: '司机',
-            width: 115,
-            prop: 'driverName'
-          }, {
-            label: '电话',
-            width: 160,
-            prop: 'tel'
-          }, {
-            label: '运费',
-            prop: 'landAmountD'
-          }, {
-            label: '委托备注',
-            width: 245,
-            prop: 'remarks'
-          }, {
-            label: '车队备注',
-            width: 245,
-            prop: 'fleetRemarks'
-          }, {
-            label: '司机备注',
-            width: 245,
-            prop: 'driverRemarks'
-          }
+        column: [{
+          label: '货运日期',
+          type: "datetime",
+          format: 'yyyy-MM-dd HH:mm:ss',
+          valueFormat: 'yyyy-MM-dd HH:mm:ss',
+          width: 200,
+          index: 1,
+          prop: 'arrivalTime'
+        }, {
+          label: '受理日期',
+          type: "datetime",
+          format: 'yyyy-MM-dd HH:mm:ss',
+          valueFormat: 'yyyy-MM-dd HH:mm:ss',
+          width: 200,
+          index: 2,
+          prop: 'acceptTime'
+        }, {
+          label: '实际到厂时间',
+          prop: 'realArrivalTime',
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          defaultTime: ['00:00:00', '23:59:59'],
+          format: "yyyy-MM-dd HH:mm:ss",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          index:3,
+          width: 140,
+        }, {
+          label: '完工日期',
+          prop: 'finishedTime',
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          defaultTime: ['00:00:00', '23:59:59'],
+          format: "yyyy-MM-dd HH:mm:ss",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          index: 4,
+          width: 140,
+        }, {
+          label: '箱型',
+          width: 100,
+          slot: true,
+          index: 5,
+          prop: 'ctnType'
+        }, {
+          label: '箱量',
+          width: 50,
+          index: 6,
+          prop: 'ctnQuantity'
+        }, {
+          label: '货物名称',
+          overHidden: true,
+          width: 160,
+          index: 7,
+          prop: 'goods'
+        }, {
+          label: '件数',
+          width: 100,
+          overHidden: true,
+          controls: false,
+          cell: true,
+          index: 8,
+          prop: 'quantity',
+          type: 'number',
+          precision: 0
+        }, {
+          label: '重量',
+          width: 160,
+          prop: 'landWeight',
+          controls: false,
+          precision: 2,
+          index: 9,
+          type: 'number'
+        }, {
+          label: '尺码',
+          width: 100,
+          overHidden: true,
+          index: 10,
+          prop: 'size',
+        }, {
+          label: '委托备注',
+          width: 245,
+          index: 11,
+          prop: 'remarks'
+        }, {
+          label: '状态',
+          width: 100,
+          index: 12,
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          },
+          dataType: "string",
+          prop: 'status'
+        }
+          // {
+          //   label: '应付陆运费',
+          //   cell: true,
+          //   prop: 'landAmountC'
+          // }
+          // , {
+          //   label: '车号',
+          //   width: 150,
+          //   prop: 'plateNo'
+          // }, {
+          //   label: '司机',
+          //   width: 115,
+          //   prop: 'driverName'
+          // }, {
+          //   label: '电话',
+          //   width: 160,
+          //   prop: 'tel'
+          // }, {
+          //   label: '车队备注',
+          //   width: 245,
+          //   prop: 'fleetRemarks'
+          // }, {
+          //   label: '司机备注',
+          //   width: 245,
+          //   prop: 'driverRemarks'
+          // }
         ]
       },
       vehicleOption: {},
@@ -892,22 +945,25 @@ export default {
             message: " ",
             trigger: "blur"
           }],
-        }, {
-          label: '货运日期',
-          type: "datetime",
-          format: 'yyyy-MM-dd HH:mm:ss',
-          valueFormat: 'yyyy-MM-dd HH:mm:ss',
-          prop: 'arrivalTime',
-          rules: [{
-            required: true,
-            message: " ",
-            trigger: "blur"
-          }],
-        }, {
-          label: '备注',
-          span: 24,
-          prop: 'remarks'
-        }]
+        }
+          // , {
+          //   label: '货运日期',
+          //   type: "datetime",
+          //   format: 'yyyy-MM-dd HH:mm:ss',
+          //   valueFormat: 'yyyy-MM-dd HH:mm:ss',
+          //   prop: 'arrivalTime',
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }],
+          // }
+          , {
+            label: '备注',
+            span: 24,
+            prop: 'remarks',
+            type: 'textarea'
+          }]
       },
       goodsOptionFormTwo: {
         menuBtn: false,
@@ -958,8 +1014,7 @@ export default {
             prop: 'podId'
           }, {
             label: '预配箱量',
-            prop: 'expectCtnQty',
-            type: 'date'
+            prop: 'expectCtnQty'
           }, {
             label: '截单日期',
             prop: 'siCutoffDate',
@@ -1283,36 +1338,66 @@ export default {
     this.collectionOption = await this.getColumnData(this.getColumnName(85.4), this.collectionOptionBackup);
     this.paymentOption = await this.getColumnData(this.getColumnName(85.5), this.paymentOptionBackup);
     if (this.id) {
-      detailDelegationList({id: this.id, kind: '1'}).then(res => {
-        this.goodsForm = res.data.data
-        this.tableData = res.data.data.orderAddressList
-        this.entrustList = res.data.data.itemList
-        this.goodsList = res.data.data.itemList
-        this.vehicleList = res.data.data.orderItemList
-        this.orderFilesList = res.data.data.fileList
-        if (res.data.data.orderFeeList.length > 0) {
-          res.data.data.orderFeeList.forEach(item => {
-            if (item.type == 1) {
-              this.collectionList.push(item)
-            } else {
-              this.paymentList.push(item)
-            }
-          })
-        }
-        this.goodsOptionFormTwo.disabled = this.goodsOptionForm.disabled = this.goodsOptionFormC.disabled = this.collectionOption.disabled = this.paymentOption.disabled = this.goodsForm.status !== 0
-        delete this.goodsForm.orderAddressList
-        delete this.goodsForm.itemList
-        delete this.goodsForm.orderFeeList
-        // this.tableData.forEach(item => {
-        //   if (item.region) item.region = item.region.split(',')
-        // })
-        //查询业务员
-        this.salesmanQuery()
-      })
+      if (this.id.slice(0, 4) === 'copy') {
+        detailDelegationList({id: this.id.slice(4, this.id.length), kind: '1'}).then(res => {
+          this.goodsForm = res.data.data
+          this.tableData = res.data.data.orderAddressList
+          this.entrustList = res.data.data.itemList
+          this.goodsList = res.data.data.itemList
+          this.vehicleList = res.data.data.orderItemList
+          this.orderFilesList = res.data.data.fileList
+          if (res.data.data.orderFeeList.length > 0) {
+            res.data.data.orderFeeList.forEach(item => {
+              if (item.type == 1) {
+                this.collectionList.push(item)
+              } else {
+                this.paymentList.push(item)
+              }
+            })
+          }
+          this.goodsOptionFormTwo.disabled = this.goodsOptionForm.disabled = this.goodsOptionFormC.disabled = this.collectionOption.disabled = this.paymentOption.disabled = this.goodsForm.status !== 0
+          delete this.goodsForm.orderAddressList
+          delete this.goodsForm.itemList
+          delete this.goodsForm.orderFeeList
+          this.goodsForm.id = ''
+          this.tableData.forEach(item => item.id = '')
+          this.entrustList.forEach(item => item.id = '')
+          this.goodsList.forEach(item => item.id = '')
+          this.vehicleList.forEach(item => item.id = '')
+          this.orderFilesList.forEach(item => item.id = '')
+          //查询业务员
+          this.salesmanQuery()
+        })
+      } else {
+        detailDelegationList({id: this.id, kind: '1'}).then(res => {
+          this.goodsForm = res.data.data
+          this.tableData = res.data.data.orderAddressList
+          this.entrustList = res.data.data.itemList
+          this.goodsList = res.data.data.itemList
+          this.vehicleList = res.data.data.orderItemList
+          this.orderFilesList = res.data.data.fileList
+          if (res.data.data.orderFeeList.length > 0) {
+            res.data.data.orderFeeList.forEach(item => {
+              if (item.type == 1) {
+                this.collectionList.push(item)
+              } else {
+                this.paymentList.push(item)
+              }
+            })
+          }
+          this.goodsOptionFormTwo.disabled = this.goodsOptionForm.disabled = this.goodsOptionFormC.disabled = this.collectionOption.disabled = this.paymentOption.disabled = this.goodsForm.status !== 0
+          delete this.goodsForm.orderAddressList
+          delete this.goodsForm.itemList
+          delete this.goodsForm.orderFeeList
+          // this.tableData.forEach(item => {
+          //   if (item.region) item.region = item.region.split(',')
+          // })
+          //查询业务员
+          this.salesmanQuery()
+        })
+      }
     } else {
-      this.tableData = [{
-      }, {
-      }]
+      this.tableData = [{}, {}]
       getCorp().then(res => {
         this.goodsForm = {
           corpId: res.data.data ? res.data.data.id : '',
@@ -1324,7 +1409,7 @@ export default {
         }
         this.salesmanQuery()
       })
-      this.entrustList = [{$cellEdit: true}]
+      this.entrustList = []
     }
     // 非租户模式默认加载管理组数据
     if (!website.tenantMode) {
@@ -1335,6 +1420,13 @@ export default {
     this.$refs.other.show = false
   },
   methods: {
+    changeSelect(val) {
+      for (let item of this.salesmanList) {
+        if (item.id == val) {
+          this.goodsForm.salesmanDept = item.deptId.split(',')[0]
+        }
+      }
+    },
     initData(tenantId) {
       getDeptTree(tenantId).then(res => {
         const column = this.findObject(this.goodsOptionForm.column, "salesmanDept");
@@ -1756,4 +1848,9 @@ export default {
 ::v-deep .el-form-item__content {
   line-height: 32px;
 }
+
+::v-deep .el-card__body {
+  padding: 10px 15px;
+  font-size: 14px;
+}
 </style>

+ 24 - 8
src/views/landTransportation/placeAnOrder/index.vue

@@ -115,13 +115,14 @@
           :option="option"
           @on-load="onLoad"
           @row-del="rowDel"
+          @selection-change="selectionChange"
           @resetColumn="resetColumn"
           @saveColumn="saveColumn"
           @search-criteria-switch="searchCriteriaSwitch"
           @search-change="searchChange">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="primary" icon="el-icon-plus" :size="size" @click="rowSave">创建单据</el-button>
-          <el-button type="success" :size="size">复制单据</el-button>
+          <el-button type="success" :size="size" :disabled="selectionList.length !== 1" @click="copyDocument">复制单据</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报表打印</el-button>
         </template>
         <template slot="corpNameSearch" slot-scope="{ row,index}">
@@ -132,7 +133,7 @@
         <template slot="addressDetail" slot-scope="{ row,index}">
           <el-tooltip class="item" effect="dark" placement="top">
             <div v-html="ToBreak(row.addressDetail)" slot="content"></div>
-/*            <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{row.addressDetail}}</div>*/
+            <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{row.addressDetail}}</div>
           </el-tooltip>
         </template>
         <template slot-scope="{row,index}" slot="menu">
@@ -154,6 +155,9 @@
         <template slot="orderNo" slot-scope="{row,index}">
           <span class="el-button--text" style="cursor: pointer" @click.stop="rowCell(row,index)">{{row.orderNo}}</span>
         </template>
+        <template slot="billNo" slot-scope="{row,index}">
+          <span class="el-button--text" style="cursor: pointer" @click.stop="rowCell(row,index)">{{row.billNo}}</span>
+        </template>
       </avue-crud>
     </basic-container>
     <detail-page v-if="!show" @backToList="backToList" :id="id"></detail-page>
@@ -175,6 +179,7 @@ export default {
       id: '',
       activeName: null,
       show: true,
+      selectionList:[],
       dataList: [],
       loading: false,
       page: {
@@ -198,6 +203,8 @@ export default {
         searchSpan: 8,
         searchIcon: true,
         searchIndex: 2,
+        selection: true,
+        highlightCurrentRow:true,
         column:[
           {
             label: '货运日期',
@@ -327,11 +334,11 @@ export default {
       }
     }
   },
-  activated() {
-    if (this.$route.query.params){
-      this.rowCell({id:this.$route.query.params},0)
-    }
-  },
+  // activated() {
+  //   if (this.$route.query.params){
+  //     this.rowCell({id:this.$route.query.params},0)
+  //   }
+  // },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(85), this.optionList);
     this.key++
@@ -346,6 +353,10 @@ export default {
     }
   },
   methods: {
+    selectionChange(list){
+      this.selectionList = list
+      // this.$message.success('选中的数据'+ JSON.stringify(list));
+    },
     //自定义列保存
     async saveColumn() {
       /**
@@ -446,6 +457,11 @@ export default {
     rowSave() {
       this.show = false
     },
+    //复制单据
+    copyDocument(){
+      this.id = 'copy' + this.selectionList[0].id
+      this.show = false
+    },
     backToList() {
       this.id = ''
       this.show = true
@@ -464,7 +480,7 @@ export default {
   height: 100%;
 
   ::v-deep .el-card__body {
-    padding: 10px 15px;
+    padding: 10px 5px;
     font-size: 14px;
   }
 

+ 6 - 6
src/views/maintenance/salesPolicy/configuration/customerContact.json

@@ -25,7 +25,7 @@
       "prop": "code",
       "index": 1,
       "width":100,
-      "cell": true,
+      "cell": false,
       "overHidden": true,
       "rules": [
         {
@@ -39,7 +39,7 @@
       "prop": "brand",
       "index": 1,
       "width":100,
-      "cell": true,
+      "cell": false,
       "overHidden": true,
       "rules": [
         {
@@ -53,7 +53,7 @@
       "prop": "productCategory",
       "index": 2,
       "width":100,
-      "cell": true,
+      "cell": false,
       "overHidden": true,
       "rules": [
         {
@@ -67,7 +67,7 @@
       "prop": "typeno",
       "index": 3,
       "width":100,
-      "cell": true,
+      "cell": false,
       "overHidden": true,
       "rules": [
         {
@@ -81,7 +81,7 @@
       "prop": "brandItem",
       "index": 3,
       "width":100,
-      "cell": true,
+      "cell": false,
       "overHidden": true,
       "rules": [
         {
@@ -94,7 +94,7 @@
       "label": "供应商",
       "prop": "corpId",
       "index": 3,
-      "width":100,
+      "width":160,
       "cell": false,
       "slot": true,
       "overHidden": true,

+ 16 - 9
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -169,7 +169,7 @@
               </el-upload>
             </template>
             <template slot-scope="{ row, index }" slot="menu">
-              <el-button type="text" size="small" @click="rowCell(row, index)" :disabled="!form.id"
+              <el-button type="text" size="small" @click="rowCell(row, index)"
                 >{{ row.$cellEdit ? "保存" : "修改" }}
               </el-button>
               <el-button
@@ -321,6 +321,7 @@ import {
 import goodsOption from "./configuration/commodity.json";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import { getToken } from "@/util/auth";
+import { getPurchasePrice } from "@/api/basicData/fees"
 
 export default {
   name: "detailsPage",
@@ -636,8 +637,9 @@ export default {
         } else {
           this.selectionList.forEach(e => {
             if (this.reData.salesType == 1) {
-              this.contactsData.forEach((item, index) => {
+              this.contactsData.forEach(async (item, index) => {
                 if (index == this.reData.index) {
+                  item.purchasePrice = await this.getPurchasePrice(e);
                   item.itemId = e.id;
                   item.code = e.code;
                   item.cname = e.cname;
@@ -654,7 +656,7 @@ export default {
                 }
               });
             } else {
-              this.contactsDataBuyFree.forEach((item, index) => {
+              this.contactsDataBuyFree.forEach(async (item, index) => {
                 item.itemId = e.id;
                 item.code = e.code;
                 item.cname = e.cname;
@@ -675,9 +677,9 @@ export default {
         }
       } else {
         if (this.salesType == 1) {
-          this.selectionList.forEach(item => {
-            console.log(item);
+          this.selectionList.forEach(async item => {
             this.contactsData.push({
+              purchasePrice: await this.getPurchasePrice(item),
               itemId: item.id,
               code: item.code,
               brand: item.brand,
@@ -686,7 +688,6 @@ export default {
               brandItem: item.brandItem,
               corpId: item.corpId,
               corpName: item.corpName,
-              purchasePrice: "",
               salesPrice: "",
               specialOffer: "",
               updateUserName: "",
@@ -771,8 +772,7 @@ export default {
     },
     //商品编辑
     rowCell(row, index) {
-      console.log(row);
-      if (row.$cellEdit) {
+      if (row.$cellEdit && this.form.id) {
         itemSubmit({...row,pid: this.form.id}).then(res => {
           this.$message.success('保存成功')
           this.$refs.crudContact.rowCell(row, index);
@@ -909,7 +909,14 @@ export default {
         arr.push(e.id);
       });
       this.form.corps = arr;
-    }
+    },
+    async getPurchasePrice(row) {
+      let data;
+      await getPurchasePrice({code: row.code}).then(res => {
+        data = res.data.data.length > 0? res.data.data[0].purchasePrice: 0
+      })
+      return data;
+    },
   }
 };
 </script>