Browse Source

修改国内贸易列表查询

lichao 3 năm trước cách đây
mục cha
commit
de1074c9e5
21 tập tin đã thay đổi với 424 bổ sung361 xóa
  1. 2 2
      src/views/businessManagement/deliveryNotice/configuration/commodity.json
  2. 11 5
      src/views/businessManagement/deliveryNotice/configuration/mainList.json
  3. 4 4
      src/views/businessManagement/deliveryNotice/configuration/mainListCost.json
  4. 96 35
      src/views/businessManagement/deliveryNotice/detailsPageEdit.vue
  5. 35 12
      src/views/businessManagement/deliveryNotice/index.vue
  6. 2 2
      src/views/businessManagement/purchaseOrder/configuration/commodity.json
  7. 1 1
      src/views/businessManagement/purchaseOrder/configuration/customerContact.json
  8. 10 4
      src/views/businessManagement/purchaseOrder/configuration/mainList.json
  9. 4 4
      src/views/businessManagement/purchaseOrder/configuration/mainListCost.json
  10. 30 156
      src/views/businessManagement/purchaseOrder/detailsPageEdit.vue
  11. 20 7
      src/views/businessManagement/purchaseOrder/index.vue
  12. 2 2
      src/views/businessManagement/receipt/configuration/commodity.json
  13. 9 3
      src/views/businessManagement/receipt/configuration/mainList.json
  14. 4 4
      src/views/businessManagement/receipt/configuration/mainListCost.json
  15. 58 37
      src/views/businessManagement/receipt/detailsPageEdit.vue
  16. 32 13
      src/views/businessManagement/receipt/index.vue
  17. 5 4
      src/views/businessManagement/salesOrder/configuration/commodity.json
  18. 11 5
      src/views/businessManagement/salesOrder/configuration/mainList.json
  19. 4 4
      src/views/businessManagement/salesOrder/configuration/mainListCost.json
  20. 50 37
      src/views/businessManagement/salesOrder/detailsPageEdit.vue
  21. 34 20
      src/views/businessManagement/salesOrder/index.vue

+ 2 - 2
src/views/businessManagement/deliveryNotice/configuration/commodity.json

@@ -4,7 +4,7 @@
   "calcHeight": 80,
   "tip": false,
   "addBtn": false,
-  "searchShow": false,
+  "searchShow": true,
   "searchShowBtn": false,
   "menu": false,
   "searchMenuSpan": 6,
@@ -60,7 +60,7 @@
     {
       "label": "规格编码",
       "prop": "typeno",
-      "search": true
+      "search": false
     },
     {
       "label": "品牌",

+ 11 - 5
src/views/businessManagement/deliveryNotice/configuration/mainList.json

@@ -29,7 +29,7 @@
   "column": [
     {
       "label": "销售订单号",
-      "prop": "orderNo",
+      "prop": "orgOrderNo",
       "search": true,
       "index": 1,
       "width": 100,
@@ -91,7 +91,7 @@
     },
     {
       "label": "收货地址",
-      "prop": "a",
+      "prop": "arrivalAddress",
       "search": true,
       "index": 14,
       "width": 100,
@@ -99,7 +99,7 @@
     },
     {
       "label": "收货人",
-      "prop": "b",
+      "prop": "arrivalContact",
       "search": true,
       "index": 14,
       "width": 100,
@@ -107,15 +107,21 @@
     },
     {
       "label": "收货电话",
-      "prop": "c",
+      "prop": "arrivalTel",
       "search": true,
       "index": 14,
       "width": 100,
       "overHidden": true
     },
     {
+      "type": "select",
+      "dicUrl": "/api/blade-user/client/gainUser",
+      "props": {
+        "label": "account",
+        "value": "id"
+      },
       "label": "制单人",
-      "prop": "createUserName",
+      "prop": "createUser",
       "search": true,
       "index": 14,
       "width": 100,

+ 4 - 4
src/views/businessManagement/deliveryNotice/configuration/mainListCost.json

@@ -6,7 +6,7 @@
   "lazy": true,
   "tip": false,
   "addBtn": false,
-  "searchShow": false,
+  "searchShow": true,
   "searchShowBtn": false,
   "menu": false,
   "simplePage": true,
@@ -47,7 +47,7 @@
     {
       "label": "币别",
       "prop": "fcyno",
-      "search": true,
+      "search": false,
       "index": 3,
       "width": 100,
       "rules": [
@@ -61,7 +61,7 @@
     {
       "label": "计量单位",
       "prop": "unitno",
-      "search": true,
+      "search": false,
       "index": 4,
       "width": 100,
       "rules": [{
@@ -74,7 +74,7 @@
       "label": "收付",
       "type": "select",
       "prop": "dc",
-      "search": true,
+      "search": false,
       "index": 5,
       "width": 100,
       "dicData": [{

+ 96 - 35
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -7,35 +7,38 @@
                    @click="backToList">返回列表
         </el-button>
       </div>
-      <el-button
-        class="el-button--small-yh add-customer-btn"
-        style="right: 245px;"
-        type="primary"
-        @click="revokeOutGoods"
-        v-if="form.deliveryStatus !== '录入'"
-        :disabled="detailData.seeDisabled"
-      >撤销发货</el-button>
-      <el-button
-        class="el-button--small-yh add-customer-btn"
-        style="right: 245px;"
-        type="primary"
-        @click="sendOutGoods"
-        v-if="form.deliveryStatus == '录入'"
-        :disabled="detailData.seeDisabled"
-      >确认发货</el-button>
-      <el-button
-        class="el-button--small-yh add-customer-btn"
-        type="success" style="right: 140px;" @click="copyOrder"
-        :disabled="detailData.seeDisabled">
-        复制新单
-      </el-button>
-      <el-button
-          class="el-button--small-yh add-customer-btn"
+      <div class="add-customer-btn">
+        <el-button
+          class="el-button--small-yh"
+          style="right: 245px;"
+          type="primary"
+          @click="revokeOutGoods"
+          v-if="form.deliveryStatus !== '录入'"
+          :disabled="detailData.seeDisabled"
+        >撤销发货</el-button>
+        <el-button
+          class="el-button--small-yh"
+          style="right: 245px;"
+          type="primary"
+          @click="sendOutGoods"
+          v-if="form.deliveryStatus == '录入'"
+          :disabled="detailData.seeDisabled"
+        >确认发货</el-button>
+        <el-button
+          class="el-button--small-yh"
+          type="success" style="right: 140px;" @click="copyOrder"
+          :disabled="detailData.seeDisabled">
+          复制新单
+        </el-button>
+        <el-button
+          class="el-button--small-yh"
           type="primary"
           :disabled="disabled || detailData.seeDisabled"
           @click="editCustomer(false)"
-      >{{ form.id ? '确认修改' : '确认新增' }}
-      </el-button>
+          :loading="saveLoading"
+        >{{ form.id ? '确认修改' : '确认新增' }}
+        </el-button>
+      </div>
     </div>
     <div style="margin-top: 60px">
       <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
@@ -53,6 +56,9 @@
                 <el-select v-else-if="item.prop === 'deliveryStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="item.disabled || detailData.seeDisabled">
                   <el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue" size="small"></el-option>
                 </el-select>
+                <el-select v-else-if="item.prop === 'warehouseType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
+                  <el-option v-for="(item,index) in warehouseTypeOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
+                </el-select>
 <!--                <avue-input-tree-->
 <!--                  v-else-if="item.prop === 'warehouseType'"-->
 <!--                  leaf-only-->
@@ -65,9 +71,8 @@
 <!--                  @change="warehouseTreeChange"-->
 <!--                >-->
 <!--                </avue-input-tree>-->
-                <el-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
-                  <el-option v-for="(item,index) in warehouseName" :key="index" :label="item.cname" :value="item.id" size="small"></el-option>
-                </el-select>
+                <warehouse-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]"
+                                 :configuration="configurationWarehouse" style="width: 100%" :disabled="detailData.seeDisabled"/>
                 <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
               </el-form-item>
@@ -88,7 +93,7 @@
               @saveColumn="saveColumn('goods')"
           >
             <template slot="code" slot-scope="{row,index}">
-              <span style="float: left;padding-top: 2px">{{ row.code }}</span>
+              <span>{{ row.code }}</span>
               <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="commodityChoice(row)" :disabled="detailData.seeDisabled">选择</el-button>
             </template>
             <template slot-scope="{row,index}" slot="menu">
@@ -109,10 +114,17 @@
               >删 除</el-button>
             </template>
             <template slot="menuLeft" slot-scope="{size}">
+<!--              <el-button type="primary"-->
+<!--                         icon="el-icon-plus"-->
+<!--                         size="small"-->
+<!--                         @click="commoditySelection"-->
+<!--                         :disabled="detailData.seeDisabled"-->
+<!--              >录入明细-->
+<!--              </el-button>-->
               <el-button type="primary"
                          icon="el-icon-plus"
                          size="small"
-                         @click="commoditySelection"
+                         @click="marketDialog = true"
                          :disabled="detailData.seeDisabled"
               >录入明细
               </el-button>
@@ -142,7 +154,7 @@
               @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
-              <span style="float: left;padding-top: 2px">{{ row.code }}</span>
+              <span>{{ row.code }}</span>
               <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled">选择</el-button>
             </template>
             <template slot="corpId" slot-scope="{ row }">
@@ -305,6 +317,25 @@
                      :disabled="tableDataCost.length !== 1">导入</el-button>
         </span>
     </el-dialog>
+<!--    导入销售明细-->
+    <el-dialog
+      title="导入销售"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="marketDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :modal-append-to-body='false'
+      :close-on-press-escape="false"
+      v-dialog-drag>
+      <market-detail
+        @importMarket="importMarket"
+        @close="closeMarkeDialog"
+        systemType="GN"
+      >
+      </market-detail>
+    </el-dialog>
   </div>
 </template>
 
@@ -329,6 +360,7 @@ import {customerList as wareHouseType} from "@/api/basicData/basicStorageType"
 import {customerList as selectWareHouse} from "@/api/basicData/basicStorageDesc"
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
 import { contrastObj, contrastList } from "@/util/contrastData";
+import  marketDetail from "@/components/procurement/market";
 
 export default {
   name: "detailsPage",
@@ -337,6 +369,9 @@ export default {
       type: Object
     }
   },
+  components: {
+    marketDetail,
+  },
   data() {
     return {
       configuration: {
@@ -346,6 +381,13 @@ export default {
         placeholder: '请点击右边按钮选择',
         dicData: []
       },
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
       form: {},
       data: [],
       loadingCost: false,
@@ -426,6 +468,7 @@ export default {
       contactsData: [],
       advantageProjectData: [],
       disabled: false,
+      saveLoading: false,
       bankOfDepositData: [],
       tableDataCost: [],
       dic: [],
@@ -574,6 +617,7 @@ export default {
         ]
       },
       statusOption: [],
+      warehouseTypeOption: [],
       // 仓库类型
       warehouseType: [],
       // 仓库名称
@@ -586,6 +630,8 @@ export default {
       oldGoodsList: [],
       oldFeesList: [],
       oldUploadList: [],
+      // 导入销售订单明细
+      marketDialog: false,
     }
   },
   //初始化查询
@@ -595,6 +641,9 @@ export default {
     this.getWorkDicts("order_status").then(res => {
       this.statusOption = res.data.data
     })
+    this.getWorkDicts("warehouseType").then(res => {
+      this.warehouseTypeOption = res.data.data
+    })
     this.$set(this.form,'deliveryStatus','录入')
     wareHouseType().then(res => {
       this.warehouseType = res.data.data.records
@@ -688,10 +737,12 @@ export default {
           // 出库金额和出库数量的比例
           this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
         })
-        console.log(this.contactsData)
         if (this.form.companyName) {
           this.configuration.dicData = this.configuration.dicData.concat(this.form.companyName)
         }
+        if (this.form.storageMap) {
+          this.configurationWarehouse.dicData = this.form.storageMap
+        }
         let feesData = []
         this.form.deliveryFeesList.forEach(item => {
           let a = {
@@ -755,6 +806,8 @@ export default {
           })
           this.form.deliveryStatus == '录入'
         }
+      }).finally(() => {
+        this.saveLoading = false
       });
     },
     // 出库数量变化时调用
@@ -1112,11 +1165,11 @@ export default {
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
-          this.disabled = true
+          this.saveLoading = true
           this.form.billType = 'FH'
           typeSave(this.form).then(res => {
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
-            this.disabled = false
+            // this.disabled = false
             if (isBack) {
               //成功关闭此页面回到列表页
               this.$emit("goBack");
@@ -1203,6 +1256,14 @@ export default {
         }
       });
     },
+    // 导入销售明细
+    importMarket(list) {
+      console.log(list)
+    },
+    // 关闭销售弹窗
+    closeMarkeDialog() {
+      this.marketDialog = false;
+    },
     // 保存列设置
     async saveColumn(name) {
       /**

+ 35 - 12
src/views/businessManagement/deliveryNotice/index.vue

@@ -43,6 +43,18 @@
         <template slot-scope="scope" slot="salesCompany">
           {{ scope.row.salesCompanyName }}
         </template>
+        <template slot="storageIdSearch">
+          <warehouseSelect
+            v-model="search.storageId"
+            :configuration="configurationWarehouse"
+          ></warehouseSelect>
+        </template>
+        <template slot-scope="scope" slot="storageId">
+          {{ scope.row.storageName }}
+        </template>
+        <template slot-scope="scope" slot="createUser">
+          {{ scope.row.createUserName }}
+        </template>
         <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
@@ -98,6 +110,13 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: [],
       },
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
       form: {},
       search: {},
       option: {},
@@ -118,7 +137,7 @@ export default {
     }
   },
   async created() {
-    this.search.businessDate = defaultDate()
+    this.search.businessDate = defaultDate(1)
     this.option = option
       // this.option = await this.getColumnData(this.getColumnName(20), option);
     let i = 0;
@@ -272,7 +291,15 @@ export default {
     },
     //点击搜索按钮触发
     searchChange(params, done) {
-      console.log(params)
+      if (params.businessDate) {
+        params.businessStartDate = params.businessDate[0]+ " " + "00:00:00"
+        params.businessEndDate = params.businessDate[1]+ " " + "23:59:59"
+      }
+      if (params.createTime) {
+        params.createTimeStart = params.createTime[0]+ " " + "00:00:00"
+        params.createTimeEnd = params.createTime[1]+ " " + "23:59:59"
+        this.$delete(params,'createTime')
+      }
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done()
@@ -294,17 +321,13 @@ export default {
       console.log('1')
     },
     onLoad(page, params) {
-      if (params) {
-        if (params.businessDate) {
-          params.businessStartDate = params.businessDate[0]+ " " + "00:00:00"
-          params.businessEndDate = params.businessDate[1]+ " " + "23:59:59"
-          this.$delete(params,'businessDate')
-        }
-        if (params.createTime) {
-          params.createStartTime = params.createTime[0]+ " " + "00:00:00"
-          params.createEndTime = params.createTime[1]+ " " + "23:59:59"
-          this.$delete(params,'createTime')
+      if (this.search.businessDate.length > 0) {
+        params = {
+          ...params,
+          businessStartDate: this.search.businessDate[0]+ " " + "00:00:00",
+          businessEndDate: this.search.businessDate[1]+ " " + "23:59:59",
         }
+        this.$delete(params,'businessDate')
       }
       let queryParams = Object.assign({}, params, {
         size: page.pageSize,

+ 2 - 2
src/views/businessManagement/purchaseOrder/configuration/commodity.json

@@ -4,7 +4,7 @@
   "calcHeight": 80,
   "tip": false,
   "addBtn": false,
-  "searchShow": false,
+  "searchShow": true,
   "searchShowBtn": false,
   "menu": false,
   "searchMenuSpan": 6,
@@ -60,7 +60,7 @@
     {
       "label": "规格编码",
       "prop": "typeno",
-      "search": true
+      "search": false
     },
     {
       "label": "品牌",

+ 1 - 1
src/views/businessManagement/purchaseOrder/configuration/customerContact.json

@@ -100,7 +100,7 @@
       ]
     },{
       "label": "订货数量",
-      "prop": "purchaseQuantity",
+      "prop": "orderQuantity",
       "index": 5,
       "width":100,
       "cell": false,

+ 10 - 4
src/views/businessManagement/purchaseOrder/configuration/mainList.json

@@ -21,7 +21,7 @@
   "column": [
     {
       "label": "销售订单号",
-      "prop": "orderNo",
+      "prop": "orgOrderNo",
       "search": true,
       "index": 1,
       "width": 100,
@@ -51,7 +51,7 @@
     },
     {
       "label": "订单数量",
-      "prop": "a",
+      "prop": "orderQuantity",
       "search": false,
       "index": 4,
       "width": 100,
@@ -59,7 +59,7 @@
     },
     {
       "label": "收货数量",
-      "prop": "b",
+      "prop": "actualQuantity",
       "search": false,
       "index": 5,
       "width": 100,
@@ -142,8 +142,14 @@
       "overHidden": true
     },
     {
+      "type": "select",
+      "dicUrl": "/api/blade-user/client/gainUser",
+      "props": {
+        "label": "account",
+        "value": "id"
+      },
       "label": "制单人",
-      "prop": "createUserName",
+      "prop": "createUser",
       "search": true,
       "index": 14,
       "width": 100,

+ 4 - 4
src/views/businessManagement/purchaseOrder/configuration/mainListCost.json

@@ -6,7 +6,7 @@
   "lazy": true,
   "tip": false,
   "addBtn": false,
-  "searchShow": false,
+  "searchShow": true,
   "searchShowBtn": false,
   "menu": false,
   "simplePage": true,
@@ -47,7 +47,7 @@
     {
       "label": "币别",
       "prop": "fcyno",
-      "search": true,
+      "search": false,
       "index": 3,
       "width": 100,
       "rules": [
@@ -61,7 +61,7 @@
     {
       "label": "计量单位",
       "prop": "unitno",
-      "search": true,
+      "search": false,
       "index": 4,
       "width": 100,
       "rules": [{
@@ -74,7 +74,7 @@
       "label": "收付",
       "type": "select",
       "prop": "dc",
-      "search": true,
+      "search": false,
       "index": 5,
       "width": 100,
       "dicData": [{

+ 30 - 156
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -7,18 +7,21 @@
                    @click="backToList">返回列表
         </el-button>
       </div>
-      <el-button
-        class="el-button--small-yh add-customer-btn"
-        type="success" style="right: 140px;" @click="copyOrder">
-        复制新单
-      </el-button>
-      <el-button
-          class="el-button--small-yh add-customer-btn"
+      <div class="add-customer-btn">
+        <el-button
+          class="el-button--small-yh"
+          type="success" style="right: 140px;" @click="copyOrder">
+          复制新单
+        </el-button>
+        <el-button
+          class="el-button--small-yh"
           type="primary"
           :disabled="disabled || detailData.seeDisabled"
           @click="editCustomer(false)"
-      >{{ form.id ? '确认修改' : '确认新增' }}
-      </el-button>
+          :loading="saveLoading"
+        >{{ form.id ? '确认修改' : '确认新增' }}
+        </el-button>
+      </div>
     </div>
     <div style="margin-top: 60px">
       <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
@@ -56,14 +59,14 @@
               @selection-change="productSelection"
               @saveColumn="saveColumn('goods')"
           >
-            <template slot="purchaseQuantity" slot-scope="{ row }">
+            <template slot="orderQuantity" slot-scope="{ row }">
               <el-input
                 v-if="row.$cellEdit"
-                v-model="row.purchaseQuantity"
+                v-model="row.orderQuantity"
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'                size="small"
                 @input="changeContractAmt(row)"
               ></el-input>
-              <span v-else>{{ row.purchaseQuantity }}</span>
+              <span v-else>{{ row.orderQuantity }}</span>
             </template>
             <template slot="price" slot-scope="{ row }">
               <el-input
@@ -93,7 +96,7 @@
               <span v-else>{{ row.actualQuantity }}</span>
             </template>
             <template slot="code" slot-scope="{row,index}">
-              <span style="float: left;padding-top: 2px">{{ row.code }}</span>
+              <span>{{ row.code }}</span>
               <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="commodityChoice(row)" :disabled="detailData.seeDisabled">选择</el-button>
             </template>
             <template slot-scope="{row,index}" slot="menu">
@@ -144,7 +147,7 @@
               @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
-              <span style="float: left;padding-top: 2px">{{ row.code }}</span>
+              <span>{{ row.code }}</span>
               <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled">选择</el-button>
             </template>
             <template slot="corpId" slot-scope="{ row }">
@@ -307,138 +310,6 @@
                      :disabled="tableDataCost.length !== 1">导入</el-button>
         </span>
     </el-dialog>
-    <!--    打印-->
-    <el-dialog
-        title="打印单"
-        append-to-body
-        class="el-dialogDeep"
-        :visible.sync="printVisible"
-        width="100%"
-        fullscreen
-        :close-on-click-modal="false"
-        :close-on-press-escape="false">
-      <div class="print-div">
-        <div
-            style="
-            display: flex;
-            flex-direction: column;
-            justify-content: center;
-            align-item: center;
-            font-size: 24px;
-            margin-bottom: 5px;
-            width: 100%;
-            text-align: center;
-          "
-        >
-          <div><b>VITAL INDUSTRIAL GROUP LIMITED</b></div>
-          <div>NO.37 DONGHAI ROAD, QINGDAO, CHINA</div>
-          <div>TEL:0086-532-86019080 FAX:0086-532-86019080</div>
-          <div>
-            <b>COMMERCIAL INVOICE</b>
-            <span style="float: right">ORIGINAL</span>
-          </div>
-        </div>
-        <div class="print_table" style="display: flex">
-          <table
-              border="0"
-              cellspacing="0"
-              cellpadding="0"
-              style="width: 100%; line-height: 30px"
-          >
-            <tr>
-              <td colspan="5" rowspan="3">MESSERS:</td>
-              <td colspan="2">INVOICE NO.</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td colspan="2">DATE</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td colspan="2">INCOTERM .</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td colspan="5">PI NO.:</td>
-              <td colspan="2">DELIVERY PORT</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td rowspan="2">NO.</td>
-              <td rowspan="2">DESCRIPTION</td>
-              <td>THICK</td>
-              <td>LENGTH</td>
-              <td>WIDTH</td>
-              <td rowspan="2">SHEETS</td>
-              <td rowspan="2">CRATES</td>
-              <td>UNIT PRICE</td>
-              <td>TOTAL</td>
-              <td>T. AMOUNT</td>
-            </tr>
-            <tr>
-              <td>mm</td>
-              <td>mm</td>
-              <td>mm</td>
-              <td>US$/M²</td>
-              <td>M²</td>
-              <td>US$</td>
-            </tr>
-            <tr>
-              <td>1</td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-            </tr>
-            <tr>
-              <td>2</td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-            </tr>
-            <tr>
-              <td>3</td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-            </tr>
-            <tr>
-              <td colspan="9" style="text-align: right">FUMIGATION COST:</td>
-              <td></td>
-            </tr>
-            <tr>
-              <td colspan="9" style="text-align: right">INSURANCE:</td>
-              <td></td>
-            </tr>
-            <tr>
-              <td colspan="9" style="text-align: right">TOTAL:</td>
-              <td>0.00</td>
-            </tr>
-          </table>
-        </div>
-        <div class="print-footer" style="margin-top: 8px">
-          <div style="font-weight: bold">TOTAL AMOUNT: U.S. DOLLARS NINE THOUSAND FORTY SIX CENTS TWENTY FIVE ONLY.
-          </div>
-        </div>
-      </div>
-    </el-dialog>
   </div>
 </template>
 
@@ -559,6 +430,7 @@ export default {
       bankOfDepositForm: {},
       contactsData: [],
       advantageProjectData: [],
+      saveLoading: false,
       disabled: false,
       bankOfDepositData: [],
       tableDataCost: [],
@@ -791,6 +663,8 @@ export default {
             delete item.pid
           })
         }
+      }).finally(() => {
+        this.saveLoading = false
       });
     },
     copyOrder() {
@@ -851,7 +725,7 @@ export default {
     rowCell(row, index) {
       console.log(row)
       if (row.$cellEdit) {
-        if (Number(row.purchaseQuantity) < Number(row.actualQuantity)) {
+        if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
           return this.$message.error('订货数量不能小于发货数量')
         }
       }
@@ -900,7 +774,7 @@ export default {
         this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
         this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
         this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
-        this.contactsData[this.choiceIndexT].purchaseQuantity = 0
+        this.contactsData[this.choiceIndexT].orderQuantity = 0
         this.contactsData[this.choiceIndexT].price = 0
         this.contactsData[this.choiceIndexT].amount = 0
         selectGoodsNum({
@@ -958,7 +832,7 @@ export default {
             delete this.tableData[item].id
             this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specificationAndModel)
             this.$set(this.tableData[item], 'priceType', '一般')
-            this.$set(this.tableData[item], 'purchaseQuantity', 0)
+            this.$set(this.tableData[item], 'orderQuantity', 0)
             this.$set(this.tableData[item], 'actualQuantity', 0)
             this.tableData[item].price = 0
             this.tableData[item].amount = 0
@@ -1155,15 +1029,15 @@ export default {
     },
     // 计算费用
     changeContractAmt(row) {
-      let purchaseQuantity = 0;
+      let orderQuantity = 0;
       let price = 0;
       if (row.price) {
         price = row.price;
       }
-      if (row.purchaseQuantity) {
-        purchaseQuantity = row.purchaseQuantity;
+      if (row.orderQuantity) {
+        orderQuantity = row.orderQuantity;
       }
-      this.$set(row, "amount", Number(purchaseQuantity) * Number(price)).toFixed(2);
+      this.$set(row, "amount", Number(orderQuantity) * Number(price)).toFixed(2);
     },
     // 去重
     removeRepeat() {
@@ -1183,7 +1057,7 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           for (let item in this.contactsData) {
-            if (Number(this.contactsData[item].purchaseQuantity) < Number(this.contactsData[item].actualQuantity)) {
+            if (Number(this.contactsData[item].orderQuantity) < Number(this.contactsData[item].actualQuantity)) {
               return this.$message.error('商品信息第'+ (parseInt(item) + 1) + '行订货数量不能小于发货数量')
             }
           }
@@ -1194,12 +1068,12 @@ export default {
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
-          this.disabled = true
+          this.saveLoading = true
           this.form.billType = 'CG'
           this.$set(this.form, 'tradeType', 'GN')
           typeSave(this.form).then(res => {
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
-            this.disabled = false
+            // this.saveLoading = false
             if (isBack) {
               //成功关闭此页面回到列表页
               this.$emit("goBack");

+ 20 - 7
src/views/businessManagement/purchaseOrder/index.vue

@@ -32,6 +32,9 @@
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.strCorpName }}
         </template>
+        <template slot-scope="scope" slot="createUser">
+          {{ scope.row.createUserName }}
+        </template>
         <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
@@ -113,7 +116,7 @@ export default {
     }
   },
   async created() {
-    this.search.requiredArrivalDate = defaultDate()
+    this.search.requiredArrivalDate = defaultDate(1)
     this.option = option
     // this.option = await this.getColumnData(this.getColumnName(17), option);
     let i = 0;
@@ -230,7 +233,16 @@ export default {
     },
     //点击搜索按钮触发
     searchChange(params, done) {
-      console.log(params)
+      if (params.requiredArrivalDate) {
+        this.$set(params, 'requiredArrivalStartDate', params.requiredArrivalDate[0]+ " " + "00:00:00")
+        this.$set(params, 'requiredArrivalEndDate', params.requiredArrivalDate[1]+ " " + "23:59:59")
+        this.$delete(params,'requiredArrivalDate')
+      }
+      if (params.createTime) {
+        params.createStartTime = params.createTime[0]+ " " + "00:00:00"
+        params.createEndTime = params.createTime[1]+ " " + "23:59:59"
+        this.$delete(params,'createTime')
+      }
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done()
@@ -252,12 +264,13 @@ export default {
       console.log('1')
     },
     onLoad(page, params) {
-      if (params) {
-        if (params.requiredArrivalDate) {
-          this.$set(params, 'requiredArrivalStartDate', params.requiredArrivalDate[0]+ " " + "00:00:00")
-          this.$set(params, 'requiredArrivalEndDate', params.requiredArrivalDate[1]+ " " + "23:59:59")
-          this.$delete(params,'requiredArrivalDate')
+      if (this.search.requiredArrivalDate.length > 0) {
+        params = {
+          ...params,
+          requiredArrivalStartDate: this.search.requiredArrivalDate[0]+ " " + "00:00:00",
+          requiredArrivalEndDate: this.search.requiredArrivalDate[1]+ " " + "23:59:59",
         }
+        this.$delete(params,'requiredArrivalDate')
       }
       let queryParams = Object.assign({tradeType: 'GN'}, params, {
         size: page.pageSize,

+ 2 - 2
src/views/businessManagement/receipt/configuration/commodity.json

@@ -4,7 +4,7 @@
   "calcHeight": 80,
   "tip": false,
   "addBtn": false,
-  "searchShow": false,
+  "searchShow": true,
   "searchShowBtn": false,
   "menu": false,
   "searchMenuSpan": 6,
@@ -60,7 +60,7 @@
     {
       "label": "规格编码",
       "prop": "typeno",
-      "search": true
+      "search": false
     },
     {
       "label": "品牌",

+ 9 - 3
src/views/businessManagement/receipt/configuration/mainList.json

@@ -33,7 +33,7 @@
   "column": [
     {
       "label": "销售订单号",
-      "prop": "orderNo",
+      "prop": "orgOrderNo",
       "search": true,
       "index": 1,
       "width": 100,
@@ -41,7 +41,7 @@
     },
     {
       "label": "采购订单号",
-      "prop": "a",
+      "prop": "srcOrderNo",
       "search": true,
       "index": 1,
       "width": 100,
@@ -124,8 +124,14 @@
       "overHidden": true
     },
     {
+      "type": "select",
+      "dicUrl": "/api/blade-user/client/gainUser",
+      "props": {
+        "label": "account",
+        "value": "id"
+      },
       "label": "制单人",
-      "prop": "createUserName",
+      "prop": "createUser",
       "search": true,
       "index": 14,
       "width": 100,

+ 4 - 4
src/views/businessManagement/receipt/configuration/mainListCost.json

@@ -6,7 +6,7 @@
   "lazy": true,
   "tip": false,
   "addBtn": false,
-  "searchShow": false,
+  "searchShow": true,
   "searchShowBtn": false,
   "menu": false,
   "simplePage": true,
@@ -47,7 +47,7 @@
     {
       "label": "币别",
       "prop": "fcyno",
-      "search": true,
+      "search": false,
       "index": 3,
       "width": 100,
       "rules": [
@@ -61,7 +61,7 @@
     {
       "label": "计量单位",
       "prop": "unitno",
-      "search": true,
+      "search": false,
       "index": 4,
       "width": 100,
       "rules": [{
@@ -74,7 +74,7 @@
       "label": "收付",
       "type": "select",
       "prop": "dc",
-      "search": true,
+      "search": false,
       "index": 5,
       "width": 100,
       "dicData": [{

+ 58 - 37
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -7,35 +7,38 @@
                    @click="backToList">返回列表
         </el-button>
       </div>
-      <el-button
-        class="el-button--small-yh add-customer-btn"
-        style="right: 245px;"
-        type="primary"
-        @click="revokeInGoods"
-        v-if="form.deliveryStatus !== '录入'"
-        :disabled="detailData.seeDisabled"
-      >撤销收货</el-button>
-      <el-button
-        class="el-button--small-yh add-customer-btn"
-        style="right: 245px;"
-        type="primary"
-        @click="sendInGoods"
-        v-if="form.deliveryStatus == '录入'"
-        :disabled="detailData.seeDisabled"
-      >确认收货</el-button>
-      <el-button
-        class="el-button--small-yh add-customer-btn"
-        type="success" style="right: 140px;" @click="copyOrder"
-        :disabled="detailData.seeDisabled">
-        复制新单
-      </el-button>
-      <el-button
-          class="el-button--small-yh add-customer-btn"
+      <div class="add-customer-btn">
+        <el-button
+          class="el-button--small-yh"
+          style="right: 245px;"
+          type="primary"
+          @click="revokeInGoods"
+          v-if="form.deliveryStatus !== '录入'"
+          :disabled="detailData.seeDisabled"
+        >撤销收货</el-button>
+        <el-button
+          class="el-button--small-yh"
+          style="right: 245px;"
+          type="primary"
+          @click="sendInGoods"
+          v-if="form.deliveryStatus == '录入'"
+          :disabled="detailData.seeDisabled"
+        >确认收货</el-button>
+        <el-button
+          class="el-button--small-yh"
+          type="success" style="right: 140px;" @click="copyOrder"
+          :disabled="detailData.seeDisabled">
+          复制新单
+        </el-button>
+        <el-button
+          class="el-button--small-yh"
           type="primary"
           :disabled="disabled || detailData.seeDisabled"
           @click="editCustomer(false)"
-      >{{ form.id ? '确认修改' : '确认新增' }}
-      </el-button>
+          :loading="saveLoading"
+        >{{ form.id ? '确认修改' : '确认新增' }}
+        </el-button>
+      </div>
     </div>
     <div style="margin-top: 60px">
       <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
@@ -53,6 +56,9 @@
                 <el-select v-else-if="item.prop === 'purchaseMode'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
                   <el-option v-for="(item,index) in procurementMethodOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
+                <el-select v-else-if="item.prop === 'warehouseType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
+                  <el-option v-for="(item,index) in warehouseTypeOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
+                </el-select>
 <!--                <avue-input-tree-->
 <!--                  v-else-if="item.prop === 'warehouseType'"-->
 <!--                  leaf-only-->
@@ -65,9 +71,8 @@
 <!--                  @change="warehouseTreeChange"-->
 <!--                >-->
 <!--                </avue-input-tree>-->
-                <el-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
-                  <el-option v-for="(item,index) in warehouseName" :key="index" :label="item.cname" :value="item.id" size="small"></el-option>
-                </el-select>
+                <warehouse-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]"
+                                  :configuration="configurationWarehouse" style="width: 100%" :disabled="detailData.seeDisabled"/>
                 <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
               </el-form-item>
@@ -88,7 +93,7 @@
               @saveColumn="saveColumn('goods')"
           >
             <template slot="code" slot-scope="{row,index}">
-              <span style="float: left;padding-top: 2px">{{ row.code }}</span>
+              <span>{{ row.code }}</span>
               <el-button type="text" size="mini" style="padding:4px 10px;float:left" :disabled="detailData.seeDisabled" @click="commodityChoice(row)">选择</el-button>
             </template>
             <template slot-scope="{row,index}" slot="menu">
@@ -142,7 +147,7 @@
               @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
-              <span style="float: left;padding-top: 2px">{{ row.code }}</span>
+              <span>{{ row.code }}</span>
               <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled">选择</el-button>
             </template>
             <template slot="corpId" slot-scope="{ row }">
@@ -340,6 +345,7 @@ export default {
   },
   data() {
     return {
+      saveLoading: false,
       configuration: {
         multipleChoices: false,
         multiple: false,
@@ -347,6 +353,13 @@ export default {
         placeholder: '请点击右边按钮选择',
         dicData: []
       },
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
       form: {},
       data: [],
       loadingCost: false,
@@ -574,6 +587,7 @@ export default {
       },
       statusOption: [],
       procurementMethodOption: [],
+      warehouseTypeOption: [],
       // 仓库类型
       warehouseType: [],
       // 仓库名称
@@ -598,6 +612,9 @@ export default {
     this.getWorkDicts("procurement_method").then(res => {
       this.procurementMethodOption = res.data.data
     })
+    this.getWorkDicts("warehouseType").then(res => {
+      this.warehouseTypeOption = res.data.data
+    })
     wareHouseType().then(res => {
       this.warehouseType = res.data.data.records
       this.warehouseType.forEach(item => {
@@ -752,6 +769,8 @@ export default {
           })
           this.form.deliveryStatus == '录入'
         }
+      }).finally(() => {
+        this.saveLoading = false
       });
     },
     copyOrder() {
@@ -1163,10 +1182,10 @@ export default {
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
-          this.disabled = true
+          this.saveLoading = true
           typeSave(this.form).then(res => {
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
-            this.disabled = false
+            // this.saveLoading = false
             if (isBack) {
               //成功关闭此页面回到列表页
               this.$emit("goBack");
@@ -1181,10 +1200,12 @@ export default {
     },
     //返回列表
     backToList() {
-      console.log(contrastObj(this.form, this.oldForm))
-      console.log(contrastList(this.contactsData, this.oldGoodsList))
-      console.log(contrastList(this.advantageProjectData, this.oldFeesList))
-      console.log(contrastList(this.bankOfDepositData, this.oldUploadList))
+      console.log(this.contactsData)
+      console.log(this.oldGoodsList)
+      // console.log(contrastObj(this.form, this.oldForm))
+      // console.log(contrastList(this.contactsData, this.oldGoodsList))
+      // console.log(contrastList(this.advantageProjectData, this.oldFeesList))
+      // console.log(contrastList(this.bankOfDepositData, this.oldUploadList))
       if (contrastObj(this.form, this.oldForm) ||
         contrastList(this.contactsData, this.oldGoodsList) ||
         contrastList(this.advantageProjectData, this.oldFeesList) ||

+ 32 - 13
src/views/businessManagement/receipt/index.vue

@@ -46,12 +46,15 @@
         <template slot="storageIdSearch">
           <warehouseSelect
             v-model="search.storageId"
-            :configuration="configuration"
+            :configuration="configurationWarehouse"
           ></warehouseSelect>
         </template>
         <template slot-scope="scope" slot="storageId">
           {{ scope.row.storageName }}
         </template>
+        <template slot-scope="scope" slot="createUser">
+          {{ scope.row.createUserName }}
+        </template>
         <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
@@ -108,6 +111,14 @@ export default {
         dicData: [],
         clearable: true,
       },
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+        clearable: true,
+      },
       form: {},
       search: {},
       option: {},
@@ -128,7 +139,7 @@ export default {
     }
   },
   async created() {
-    this.search.businessDate = defaultDate()
+    this.search.businessDate = defaultDate(1)
     this.option = option
       // this.option = await this.getColumnData(this.getColumnName(23), option);
     let i = 0;
@@ -282,7 +293,16 @@ export default {
     },
     //点击搜索按钮触发
     searchChange(params, done) {
-      console.log(params)
+      if (params.businessDate) {
+        this.$set(params, 'businessStartDate', params.businessDate[0]+ " " + "00:00:00")
+        this.$set(params, 'businessEndDate', params.businessDate[1]+ " " + "23:59:59")
+        this.$delete(params,'businessDate')
+      }
+      if (params.createTime) {
+        this.$set(params, 'createStartTime', params.createTime[0]+ " " + "00:00:00")
+        this.$set(params, 'createEndTime', params.createTime[1]+ " " + "23:59:59")
+        this.$delete(params,'createTime')
+      }
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done()
@@ -304,17 +324,16 @@ export default {
       console.log('1')
     },
     onLoad(page, params) {
-      if (params) {
-        if (params.businessDate) {
-          this.$set(params, 'businessStartDate', params.businessDate[0]+ " " + "00:00:00")
-          this.$set(params, 'businessEndDate', params.businessDate[1]+ " " + "23:59:59")
-          this.$delete(params,'businessDate')
-        }
-        if (params.createTime) {
-          this.$set(params, 'createStartTime', params.createTime[0]+ " " + "00:00:00")
-          this.$set(params, 'createEndTime', params.createTime[1]+ " " + "23:59:59")
-          this.$delete(params,'createTime')
+      if (this.search.businessDate.length > 0) {
+        params = {
+          ...params,
+          businessStartDate: this.search.businessDate[0]+ " " + "00:00:00",
+          businessEndDate: this.search.businessDate[1]+ " " + "23:59:59",
         }
+        this.$delete(params,'businessDate')
+      }
+      if (params) {
+
       }
       let queryParams = Object.assign({}, params, {
         size: page.pageSize,

+ 5 - 4
src/views/businessManagement/salesOrder/configuration/commodity.json

@@ -4,7 +4,7 @@
   "calcHeight": 80,
   "tip": false,
   "addBtn": false,
-  "searchShow": false,
+  "searchShow": true,
   "searchShowBtn": false,
   "menu": false,
   "searchMenuSpan": 6,
@@ -31,6 +31,7 @@
       "label": "商品名称",
       "prop": "cname",
       "slot": true,
+      "search": true,
       "width": 100,
       "rules": [
         {
@@ -45,7 +46,7 @@
       "prop": "goodsTypeId",
       "dicData": [],
       "type": "tree",
-      "hide": true,
+      "hide": false,
       "addDisabled": false,
       "multiple": true,
       "props": {
@@ -58,9 +59,9 @@
       }]
     },
     {
-      "label": "规格编码",
+      "label": "规格",
       "prop": "typeno",
-      "search": true
+      "search": false
     },
     {
       "label": "品牌",

+ 11 - 5
src/views/businessManagement/salesOrder/configuration/mainList.json

@@ -38,7 +38,7 @@
   "column": [
     {
       "label": "销售订单号",
-      "prop": "orderNo",
+      "prop": "orgOrderNo",
       "search": true,
       "index": 1,
       "width": 100,
@@ -130,7 +130,7 @@
     },
     {
       "label": "订单数量",
-      "prop": "b",
+      "prop": "orderQuantity",
       "search": false,
       "index": 11,
       "width": 100,
@@ -138,7 +138,7 @@
     },
     {
       "label": "已发数量",
-      "prop": "b",
+      "prop": "actualQuantity",
       "search": false,
       "index": 12,
       "width": 100,
@@ -263,8 +263,14 @@
       "overHidden": true
     },
     {
+      "type": "select",
+      "dicUrl": "/api/blade-user/client/gainUser",
+      "props": {
+        "label": "account",
+        "value": "id"
+      },
       "label": "制单人",
-      "prop": "createUserName",
+      "prop": "createUser",
       "search": true,
       "index": 24,
       "width": 100,
@@ -277,7 +283,7 @@
       "searchRange": true,
       "prop": "createTime",
       "search": true,
-      "index": 19,
+      "index": 25,
       "width": 100,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",

+ 4 - 4
src/views/businessManagement/salesOrder/configuration/mainListCost.json

@@ -6,7 +6,7 @@
   "lazy": true,
   "tip": false,
   "addBtn": false,
-  "searchShow": false,
+  "searchShow": true,
   "searchShowBtn": false,
   "menu": false,
   "simplePage": true,
@@ -47,7 +47,7 @@
     {
       "label": "币别",
       "prop": "fcyno",
-      "search": true,
+      "search": false,
       "index": 3,
       "width": 100,
       "rules": [
@@ -61,7 +61,7 @@
     {
       "label": "计量单位",
       "prop": "unitno",
-      "search": true,
+      "search": false,
       "index": 4,
       "width": 100,
       "rules": [{
@@ -74,7 +74,7 @@
       "label": "收付",
       "type": "select",
       "prop": "dc",
-      "search": true,
+      "search": false,
       "index": 5,
       "width": 100,
       "dicData": [{

+ 50 - 37
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -7,25 +7,29 @@
                    @click="backToList">返回列表
         </el-button>
       </div>
-      <el-button
-        class="el-button--small-yh add-customer-btn"
-        style="right: 245px;"
-        type="primary"
-        :disabled="detailData.seeDisabled"
-      >生成采购单</el-button>
-      <el-button
-          class="el-button--small-yh add-customer-btn"
+      <div class="add-customer-btn">
+        <el-button
+          class="el-button--small-yh"
+          style="right: 245px;"
+          type="primary"
+          :disabled="detailData.seeDisabled"
+          @click="saveSell"
+        >生成采购单</el-button>
+        <el-button
+          class="el-button--small-yh"
           type="success" style="right: 140px;" @click="copyOrder"
           :disabled="detailData.seeDisabled">
-        复制新单
-      </el-button>
-      <el-button
-          class="el-button--small-yh add-customer-btn"
+          复制新单
+        </el-button>
+        <el-button
+          class="el-button--small-yh"
           type="primary"
           :disabled="disabled || detailData.seeDisabled"
+          :loading="saveLoading"
           @click="editCustomer(false)"
-      >{{ form.id ? '确认修改' : '确认新增' }}
-      </el-button>
+        >{{ form.id ? '确认修改' : '确认新增' }}
+        </el-button>
+      </div>
     </div>
     <div style="margin-top: 60px">
       <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
@@ -82,8 +86,13 @@
               @saveColumn="saveColumn('goods')"
           >
             <template slot="code" slot-scope="{row,index}">
-              <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="commodityChoice(row)" :disabled="detailData.seeDisabled">选择</el-button>
-              <span style="float: left;padding-top: 2px">{{ row.code }}</span>
+              <el-button
+                type="text"
+                size="mini"
+                style="padding:4px 10px;float:left"
+                @click="commodityChoice(row)"
+                :disabled="detailData.seeDisabled">选择</el-button>
+              <span>{{ row.code }}</span>
             </template>
             <template slot="orderQuantity" slot-scope="{ row }">
               <el-input
@@ -158,7 +167,7 @@
               @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
-              <span style="float: left;padding-top: 2px">{{ row.code }}</span>
+              <span>{{ row.code }}</span>
               <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled">选择</el-button>
             </template>
             <template slot="corpId" slot-scope="{ row }">
@@ -371,6 +380,7 @@
                      :disabled="tableDataCost.length !== 1">导入</el-button>
         </span>
     </el-dialog>
+
   </div>
 </template>
 
@@ -385,7 +395,7 @@ import {
   getList,
   detailList,
   generateShipment,
-
+  saveSell,
 } from "@/api/basicData/configuration"
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
 import customerContact from "./configuration/customerContact.json"
@@ -415,6 +425,7 @@ export default {
   },
   data() {
     return {
+      saveLoading: false,
       disabled: false,
       form: {},
       configuration: {
@@ -791,7 +802,7 @@ export default {
         column: [
           {
             label: '销售订单号',
-            prop: 'orderNo',
+            prop: 'orgOrderNo',
             disabled: true,
             rules: [
               {
@@ -962,18 +973,6 @@ export default {
     }
   },
   watch: {
-    // '$route'(to, from) {
-    //   console.log(to, from);
-    //   if (this.$route.query.id) {
-    //     let id = JSON.parse(this.$route.query.id).replace(/\"/g, "")
-    //     detail(id).then(res => {
-    //       console.log(res.data.data)
-    //       this.form = res.data.data;
-    //     });
-    //   } else {
-    //     this.form = {}
-    //   }
-    // },
   },
   methods: {
     queryData(id, isCopy = false){
@@ -1057,12 +1056,31 @@ export default {
             delete item.pid
           })
         }
+      }).finally(() => {
+        this.saveLoading = false
       });
     },
     // 复制新单
     copyOrder() {
       this.queryData(this.form.id, true)
     },
+    // 生成采购单
+    saveSell() {
+      if (!this.form.id) {
+        return this.$message.error("此单据没有提交记录,请先提交");
+      }
+      this.$confirm("是否生成采购单?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        saveSell(this.form.id).then(res => {
+          if (res.data.code == 200) {
+            this.$message.success("生成成功");
+          }
+        });
+      });
+    },
     //点击行可编辑
     handleRowClick(row, event, column) {
     },
@@ -1552,10 +1570,9 @@ export default {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
           this.form.billType = 'XS'
-          this.disabled = true
+          this.saveLoading = true
           typeSave(this.form).then(res => {
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
-            this.disabled = false
             if (isBack) {
               //成功关闭此页面回到列表页
               this.$emit("goBack");
@@ -1599,10 +1616,6 @@ export default {
     },
     //返回列表
     backToList() {
-      console.log(contrastObj(this.form, this.oldForm))
-      console.log(contrastList(this.contactsData, this.oldGoodsList))
-      console.log(contrastList(this.advantageProjectData, this.oldFeesList))
-      console.log(contrastList(this.bankOfDepositData, this.oldUploadList))
       if (contrastObj(this.form, this.oldForm) ||
         contrastList(this.contactsData, this.oldGoodsList) ||
         contrastList(this.advantageProjectData, this.oldFeesList) ||

+ 34 - 20
src/views/businessManagement/salesOrder/index.vue

@@ -32,6 +32,9 @@
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.corpsName }}
         </template>
+        <template slot-scope="scope" slot="createUser">
+          {{ scope.row.createUserName }}
+        </template>
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制新单</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
@@ -73,7 +76,7 @@
 
 <script>
 import option from "./configuration/mainList.json";
-import {customerList, typeSave, deleteDetails} from "@/api/basicData/configuration"
+import {customerList, typeSave, deleteDetails, saveSell} from "@/api/basicData/configuration"
 import detailPage from "./detailsPageEdit";
 import search from "../../../page/index/search";
 import { defaultDate } from "@/util/date";
@@ -113,7 +116,7 @@ export default {
     }
   },
   async created() {
-    this.search.businesDate = defaultDate()
+    this.search.businesDate = defaultDate(1)
     this.option = option
     // this.option = await this.getColumnData(this.getColumnName(14), option);
     let i = 0;
@@ -158,8 +161,6 @@ export default {
     })
   },
   methods: {
-    // 获取日期
-    getDate() {},
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
       this.$confirm("确定将选择数据删除?", {
@@ -273,7 +274,31 @@ export default {
     },
     //点击搜索按钮触发
     searchChange(params, done) {
-      console.log(params)
+      if (params.businesDate) {
+        params.orderStartDate = params.businesDate[0]+ " " + "00:00:00"
+        params.orderEndDate = params.businesDate[1]+ " " + "23:59:59"
+        delete params.businesDate;
+      }
+      if (params.requiredDeliveryDate) {
+        params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
+        params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
+        this.$delete(params,'requiredDeliveryDate')
+      }
+      if (params.requiredArrivalDate) {
+        params.arrivalStartDate = params.requiredArrivalDate[0]+ " " + "00:00:00"
+        params.arrivalEndDate = params.requiredArrivalDate[1]+ " " + "23:59:59"
+        this.$delete(params,'requiredArrivalDate')
+      }
+      if (params.actualDeliveryDate) {
+        params.actualDeliveryDateStart = params.actualDeliveryDate[0]+ " " + "00:00:00"
+        params.actualDeliveryDateEnd = params.actualDeliveryDate[1]+ " " + "23:59:59"
+        this.$delete(params,'actualDeliveryDate')
+      }
+      if (params.createTime) {
+        params.createTimeStart = params.createTime[0]+ " " + "00:00:00"
+        params.createTimeEnd = params.createTime[1]+ " " + "23:59:59"
+        this.$delete(params,'createTime')
+      }
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done()
@@ -297,24 +322,13 @@ export default {
       this.onLoad(this.page,this.search);
     },
     onLoad(page, params) {
-      if (this.search.businesDate.length > 0) {
+      if (this.search.businesDate && this.search.businesDate.length > 0) {
         params = {
           ...params,
-          businesStartDate: this.search.businesDate[0],
-          businesEndDate: this.search.businesDate[1],
-        }
-      }
-      if (params) {
-        if (params.requiredDeliveryDate) {
-          params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
-          params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
-          this.$delete(params,'requiredDeliveryDate')
-        }
-        if (params.requiredArrivalDate) {
-          params.arrivalStartDate = params.requiredArrivalDate[0]+ " " + "00:00:00"
-          params.arrivalEndDate = params.requiredArrivalDate[1]+ " " + "23:59:59"
-          this.$delete(params,'requiredArrivalDate')
+          orderStartDate: this.search.businesDate[0]+ " " + "00:00:00",
+          orderEndDate: this.search.businesDate[1]+ " " + "23:59:59",
         }
+        delete params.businesDate;
       }
       let queryParams = Object.assign({}, params, {
         size: page.pageSize,