Bläddra i källkod

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

QuKatie 3 år sedan
förälder
incheckning
4282b12125

+ 1 - 2
src/components/goodsSelect/index.vue

@@ -143,8 +143,7 @@ export default {
     }
   },
   async created() {
-    this.option = option
-    // this.option = await this.getColumnData(this.getColumnName(49), option);
+    this.option = await this.getColumnData(this.getColumnName(49), option);
     // this.option.searchShow = this.configuration.searchShow ? this.configuration.searchShow : false
     this.remoteMethod()
   },

+ 1 - 1
src/components/procurement/config/market.json

@@ -71,7 +71,7 @@
       "width":120
     },{
       "label": "件数",
-      "prop": "purchaseQuantity",
+      "prop": "orderQuantity",
       "index": 9,
       "width":120
     },{

+ 17 - 1
src/components/procurement/market.vue

@@ -57,12 +57,28 @@
       this.option = await this.getColumnData(this.getColumnName(42), option);
       if (this.systemType == 'GN') {
         this.option.column.forEach(item => {
-          if (item.prop == 'billNo' || item.prop == 'invoiceWeight' || item.prop == 'billWeight') {
+          if (item.prop == 'billNo' || item.prop == 'invoiceWeight' || item.prop == 'billWeight' || item.prop == 'orderNo'
+            || item.prop == 'priceCategoryNames' || item.prop == 'itemType'
+          ) {
             item.hide = true;
             item.showColumn = false;
           }
+          // 隐藏查询
+          if (item.prop == 'orderNo') {
+            item.search = false
+          }
         })
       }
+      // 搜索按钮位置自适应
+      let i = 0;
+      this.option.column.forEach(item => {
+        if (item.search) i++
+      })
+      if (i % 4 !== 0){
+        const num = 4 - Number(i % 4)
+        this.option.searchMenuSpan = num * 6;
+        this.option.searchMenuPosition = "right";
+      }
     },
     methods:{
       refreshChange(){

+ 1 - 2
src/components/selectComponent/customerSelect.vue

@@ -142,8 +142,7 @@ export default {
     }
   },
   async created() {
-    this.option = option
-    // this.option = await this.getColumnData(this.getColumnName(47), option);
+    this.option = await this.getColumnData(this.getColumnName(47), option);
     // this.option.searchShow = this.configuration.searchShow ? this.configuration.searchShow : false
     this.remoteMethod()
   },

+ 1 - 2
src/components/warehouseSelect/index.vue

@@ -132,8 +132,7 @@ export default {
     }
   },
   async created() {
-    this.option = option
-    // this.option = await this.getColumnData(this.getColumnName(48), option);
+    this.option = await this.getColumnData(this.getColumnName(48), option);
     // this.option.searchShow = this.configuration.searchShow ? this.configuration.searchShow : false
     this.remoteMethod()
   },

+ 0 - 1
src/util/contrastData.js

@@ -24,7 +24,6 @@ export function contrastList(newlist, oldlist) {
         if (!reg.test(oldlist[i])) {
           delete oldlist[i].olditem
         }
-        console.log(newitem==Object,newitem==Array)
         if (newitem == olditem) {
           if (newlist[i][newitem] != oldlist[i][olditem]) {
             return true

+ 12 - 9
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -104,8 +104,8 @@
               @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 || !row.$cellEdit">选择</el-button>
               <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">
               <el-button
@@ -165,8 +165,8 @@
               @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
+              <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>
               <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 }">
               <selectComponent v-if="row.$cellEdit" v-model="row.corpId"
@@ -573,7 +573,7 @@ export default {
             prop: 'srcOrderNo',
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -581,10 +581,10 @@ export default {
           }, {
             label: '出库金额',
             prop: 'deliveryAmount',
-            disabled: true,
+            disabled: false,
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -592,10 +592,10 @@ export default {
           }, {
             label: '出库数量',
             prop: 'totalQuantity',
-            disabled: true,
+            disabled: false,
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -628,7 +628,7 @@ export default {
             prop: 'totalCost',
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -760,6 +760,7 @@ export default {
       this.configuration.dicData = this.form.corpName
       delete this.form.corpName
       this.$set(this.form, 'deliveryStatus', '录入')
+      this.$set(this.form, 'srcOrderNo', this.form.orgOrderNo)
       if (this.form.belongToCorpList) {
         this.$set(this.form, 'salesCompany', this.form.belongToCorpId)
         delete this.form.belongToCorpId
@@ -956,6 +957,7 @@ export default {
         this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
         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
         selectGoodsNum({
           goodsId: this.tableData[0].id,
           typeno: this.tableData[0].typeno
@@ -1342,13 +1344,14 @@ export default {
     importMarket(list) {
       console.log(list)
       list.forEach(item => {
-        item.cname = item.priceCategoryNames
+        item.cname = item.cname
         delete item.id
         delete item.createTime
         delete item.createUser
         delete item.pid
         this.$refs.crudContact.rowCellAdd(item);
       })
+      console.log(this.contactsData)
       this.marketDialog = false;
     },
     // 关闭销售弹窗

+ 48 - 28
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -109,8 +109,8 @@
               <span v-else>{{ row.actualQuantity }}</span>
             </template>
             <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 || !row.$cellEdit">选择</el-button>
               <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">
               <el-button
@@ -160,8 +160,8 @@
               @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
+              <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>
               <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 }">
               <selectComponent v-if="row.$cellEdit" v-model="row.corpId"
@@ -734,35 +734,55 @@ export default {
     //生成收货单
     generateShipmentC() {
       let lsit = []
-      for (let item in this.selection) {
-        if (!this.selection[item].id) {
-          return this.$confirm('商品信息有未保存数据, 是否立即保存?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          }).then(() => {
-            this.editCustomer(false)
-          }).catch(() => {
-            this.$message({
-              type: 'info',
-              message: '已取消'
+      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(false)
+        }).catch(() => {
+          // this.$message({
+          //   type: 'info',
+          //   message: '已取消'
+          // });
+          this.selection.forEach(item => {
+            lsit.push(item.id)
+          })
+          // lsit.push(this.selection[item].id)
+          let data = {
+            id: this.form.id,
+            orderItemIds: lsit
+          }
+          generateShipment(data).then(res => {
+            this.$router.$avueRouter.closeTag("/businessManagement/receipt/index");
+            this.$router.push({
+              path: "/businessManagement/receipt/index",
+              query: {form: JSON.stringify(res.data.data)},
             });
-          });
-        } else {
-          lsit.push(this.selection[item].id)
+          })
+        })
+      } else {
+        // lsit.push(this.selection[item].id)
+        this.selection.forEach(item => {
+          lsit.push(item.id)
+        })
+        let data = {
+          id: this.form.id,
+          orderItemIds: lsit
         }
+        generateShipment(data).then(res => {
+          this.$router.$avueRouter.closeTag("/businessManagement/receipt/index");
+          this.$router.push({
+            path: "/businessManagement/receipt/index",
+            query: {form: JSON.stringify(res.data.data)},
+          });
+        })
       }
-      let data = {
-        id: this.form.id,
-        orderItemIds: lsit
-      }
-      generateShipment(data).then(res => {
-        this.$router.$avueRouter.closeTag("/businessManagement/receipt/index");
-        this.$router.push({
-          path: "/businessManagement/receipt/index",
-          query: {form: JSON.stringify(res.data.data)},
-        });
-      })
     },
     //点击行可编辑
     handleRowClick(row, event, column) {

+ 5 - 5
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -104,8 +104,8 @@
               @saveColumn="saveColumn('goods')"
           >
             <template slot="code" slot-scope="{row,index}">
+              <el-button type="text" size="mini" style="padding:4px 10px;float:left" :disabled="detailData.seeDisabled || !row.$cellEdit" @click="commodityChoice(row)">选择</el-button>
               <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">
               <el-button
@@ -158,8 +158,8 @@
               @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
+              <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>
               <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 }">
               <selectComponent v-if="row.$cellEdit" v-model="row.corpId"
@@ -554,7 +554,7 @@ export default {
             disabled: true,
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -565,7 +565,7 @@ export default {
             disabled: true,
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -576,7 +576,7 @@ export default {
             disabled: true,
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }

+ 92 - 39
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -10,14 +10,22 @@
       <div class="add-customer-btn">
         <el-button
           class="el-button--small-yh"
-          style="right: 245px;"
           type="primary"
           :disabled="detailData.seeDisabled"
+          size="small"
+          @click="applySettlement"
+        >申请结算</el-button>
+        <el-button
+          class="el-button--small-yh"
+          type="primary"
+          :disabled="detailData.seeDisabled"
+          size="small"
           @click="saveSell"
         >生成采购单</el-button>
         <el-button
           class="el-button--small-yh"
-          type="success" style="right: 140px;" @click="copyOrder"
+          type="success" @click="copyOrder"
+          size="small"
           :disabled="detailData.seeDisabled || !this.form.id">
           复制新单
         </el-button>
@@ -26,6 +34,7 @@
           type="primary"
           :disabled="disabled || detailData.seeDisabled"
           :loading="saveLoading"
+          size="small"
           @click="editCustomer(false)"
         >{{ form.id ? '确认修改' : '确认新增' }}
         </el-button>
@@ -229,8 +238,8 @@
               @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
+              <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>
               <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 }">
               <selectComponent v-if="row.$cellEdit" v-model="row.corpId"
@@ -869,7 +878,6 @@ export default {
             label: '制单人',
             prop: 'createUserName',
             disabled: true,
-            span: 24,
             rules: [
               {
                 required: false,
@@ -1269,35 +1277,71 @@ export default {
     //生成发货单
     generateShipmentD() {
       let lsit = []
-      for (let item in this.selection) {
-        if (!this.selection[item].id) {
-          return this.$confirm('商品信息有未保存数据, 是否立即保存?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          }).then(() => {
-            this.editCustomer(false)
-          }).catch(() => {
-            this.$message({
-              type: 'info',
-              message: '已取消'
+      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(false)
+        }).catch(() => {
+          // this.$message({
+          //   type: 'info',
+          //   message: '已取消'
+          // });
+          this.selection.forEach(item => {
+            lsit.push(item.id)
+          })
+          let data = {
+            id: this.form.id,
+            orderItemIds: lsit
+          }
+          generateShipment(data).then(res => {
+            this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
+            this.$router.push({
+              path: "/businessManagement/deliveryNotice/index",
+              query: {form: JSON.stringify(res.data.data)},
             });
-          });
-        } else {
-          lsit.push(this.selection[item].id)
+          })
+        })
+      } else {
+        // lsit.push(this.selection[item].id)
+        this.selection.forEach(item => {
+          lsit.push(item.id)
+        })
+        let data = {
+          id: this.form.id,
+          orderItemIds: lsit
         }
+        generateShipment(data).then(res => {
+          this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
+          this.$router.push({
+            path: "/businessManagement/deliveryNotice/index",
+            query: {form: JSON.stringify(res.data.data)},
+          });
+        })
       }
-      let data = {
-        id: this.form.id,
-        orderItemIds: lsit
-      }
-      generateShipment(data).then(res => {
-        this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
-        this.$router.push({
-          path: "/businessManagement/deliveryNotice/index",
-          query: {form: JSON.stringify(res.data.data)},
-        });
-      })
+    },
+    // 生成结算
+    applySettlement() {
+      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(true)
+        }).catch(() => {
+        })
+      } else {}
     },
     //商品选中触发
     productSelection(selection) {
@@ -1528,7 +1572,9 @@ export default {
           typeno: list[item].typeno
         }).then(res => {
           this.$set(list[item], 'storageQuantity', res.data.data)
-          this.$set(buyFree[item], 'storageQuantity', res.data.data)
+          if (this.policyDataTwo.length > 0) {
+            this.$set(buyFree[item], 'storageQuantity', res.data.data)
+          }
         })
         if (this.policyData.length > 0) {
           this.$set(list[item], 'price', list[item].specialOffer)
@@ -1546,13 +1592,16 @@ export default {
         this.$set(list[item], 'sort', this.maxGoodsNum + 1)
         this.$set(list[item], 'purchaseAmount', list[item].purchasePrice)
 
-        this.$set(buyFree[item], 'actualQuantity', 0)
-        this.$set(buyFree[item], 'amount', 0)
-        this.$set(buyFree[item], 'priceCategory', list[item].productCategory)
-        this.$set(buyFree[item], 'priceType', this.policyForm.cname)
-        this.$set(buyFree[item], 'cname', list[item].productCategory)
-        this.$set(buyFree[item], 'sort', this.maxGoodsNum + 1)
-        this.$set(buyFree[item], 'purchaseAmount', list[item].purchasePrice)
+        if (this.policyDataTwo.length > 0) {
+          this.$set(buyFree[item], 'actualQuantity', 0)
+          this.$set(buyFree[item], 'amount', 0)
+          this.$set(buyFree[item], 'priceCategory', list[item].productCategory)
+          this.$set(buyFree[item], 'priceType', this.policyForm.cname)
+          this.$set(buyFree[item], 'cname', list[item].productCategory)
+          this.$set(buyFree[item], 'sort', this.maxGoodsNum + 2)
+          this.$set(buyFree[item], 'purchaseAmount', list[item].purchasePrice)
+          this.maxGoodsNum++
+        }
         delete list[item].id
         delete list[item].pid
         delete list[item].isDeleted
@@ -1564,7 +1613,9 @@ export default {
         this.maxGoodsNum++
         this.$refs.crudContact.rowCellAdd(list[item]);
         // this.$refs.crudContact.rowCell(list[item], this.contactsData.length - 1)
-        this.$refs.crudContact.rowCellAdd(buyFree[item]);
+        if (this.policyDataTwo.length > 0) {
+          this.$refs.crudContact.rowCellAdd(buyFree[item]);
+        }
         // this.$refs.crudContact.rowCell(buyFree[item], this.contactsData.length - 1)
       }
       this.policyDialog = false
@@ -1799,6 +1850,8 @@ export default {
             } else {
               this.queryData(res.data.data.id)
             }
+          }).finally(() => {
+            this.saveLoading = false
           })
         } else {
           return false;

+ 2 - 0
src/views/purchase/contract/config/mainList.json

@@ -22,6 +22,8 @@
   "searchIndex": 2,
   "addBtnText": "新单",
   "expand": true,
+  "expandWidth": 38,
+  "selectionWidth": 40,
   "column":[
     {
       "label": "合同号",

+ 8 - 1
src/views/purchase/contract/index.vue

@@ -32,7 +32,7 @@
           <el-table :data="scope.row.insideList" v-loading="scope.row.loading">
             <el-table-column   align="center"  width="60"></el-table-column>
             <el-table-column   type="selection" align="center"  width="50"></el-table-column>
-            <el-table-column  label="序号" type="index" align="center"  width="50"></el-table-column>
+            <el-table-column  label="#" type="index" align="center"  width="50"></el-table-column>
             <el-table-column  label="提单号" prop="billNo" align="center" show-overflow-tooltip width="200"></el-table-column>
             <el-table-column  label="货物品种" prop="priceCategoryNames" align="center" show-overflow-tooltip width="180"></el-table-column>
             <el-table-column  label="件数" prop="purchaseQuantity" align="center" show-overflow-tooltip width="120"></el-table-column>
@@ -331,4 +331,11 @@ export default {
 ::v-deep .el-table__expanded-cell{
   padding: 0 !important;
 }
+
+/deep/ .el-table__expanded-cell .el-table__header-wrapper .cell {
+  font-size: 8px !important;
+}
+/deep/ .el-table__body-wrapper .cell {
+  font-size: 8px;
+}
 </style>

+ 2 - 0
src/views/salesManagement/salesContract/config/mainList.json

@@ -20,6 +20,8 @@
   "searchLabelWidth": 120,
   "searchIcon": true,
   "searchIndex": 2,
+  "expandWidth": 38,
+  "selectionWidth": 40,
   "addBtnText": "新单",
   "expand": true,
   "rowKey": "id",

+ 8 - 3
src/views/salesManagement/salesContract/index.vue

@@ -28,11 +28,10 @@
       </template>
       <template slot-scope="{row,size}" slot="search">
       </template>
-      <template slot-scope="scope" slot="expand">
+      <template slot-scope="scope" slot="expand" width="48px">
         <el-table :data="scope.row.insideList" v-loading="scope.row.loading">
           <el-table-column   align="center"  width="60"></el-table-column>
-          <el-table-column   type="selection" align="center"  width="50"></el-table-column>
-          <el-table-column  label="序号" type="index" align="center"  width="50"></el-table-column>
+          <el-table-column  label="#" type="index" align="center"  width="50"></el-table-column>
           <el-table-column  label="提单号" prop="billNO" align="center" show-overflow-tooltip width="150"></el-table-column>
           <el-table-column  label="货物名称" prop="cname" align="center" show-overflow-tooltip width="150"></el-table-column>
           <el-table-column  label="件数" prop="actualQuantity" align="center" show-overflow-tooltip width="120"></el-table-column>
@@ -299,4 +298,10 @@ export default {
   ::v-deep .el-table__expanded-cell{
     padding: 0 !important;
   }
+  /deep/ .el-table__expanded-cell .el-table__header-wrapper .cell {
+    font-size: 8px !important;
+  }
+  /deep/ .el-table__body-wrapper .cell {
+    font-size: 8px;
+  }
 </style>