qinbai il y a 3 ans
Parent
commit
9db6cb7a4d

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

@@ -11,6 +11,7 @@
         :collapse-tags="configuration.collapseTags?configuration.collapseTags:false"
         filterable
         remote
+        clearable
         @change="changeName"
         :remote-method="remoteMethod"
     >

+ 20 - 4
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -173,6 +173,18 @@
                          clearable filterable>
                 <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
               </el-select>
+              <span v-else>{{ row.currency }}</span>
+            </template>
+            <template slot="cntrNo" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.cntrNo"
+                placeholder="请输入"
+                size="small"
+                oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+                @change="selectInventory(row)"
+              ></el-input>
+              <span v-else>{{ row.cntrNo }}</span>
             </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
@@ -483,17 +495,18 @@ export default {
     if (this.detailData.form) {
       this.buttonLoading = true;
       this.form = JSON.parse(this.detailData.form);
-      this.$set(this.form,"saleman",this.detailData.form.salesName)
+      this.$set(this.form,"saleman",this.form.salesName)
       //是否计算合同号
       this.form.id = null
       this.form.sysNo = null
 
       this.form.orderItemsList.forEach((item, index) => {
         item.srcId = item.id
-        item.itemId = item.itemId
         item.orgOrderNo = this.form.orgOrderNo
         item.contractNumber = item.orgOrderNo
         item.contractAmount = item.amount
+        item.currency = this.form.currency
+        item.exRate = this.form.exchangeRate
         if (item.actualQuantity !== 0) {   //如果发过货
           item.actualQuantity = _.subtract(item.orderQuantity, item.actualQuantity); //发货件数 =  总件数 - 已发件数
         } else {
@@ -504,8 +517,10 @@ export default {
         //   BQ : _.divide(item.billWeight, item.orderQuantity),
         //   IQ : _.divide(item.invoiceWeight, item.orderQuantity)
         // }
-        delete item.actualQuantity
+        delete item.orderQuantity
         delete item.id
+        // this.$refs.crudContact.rowCellAdd(item);
+        // this.$refs.crudContact.rowCell(item,this.contactsData.length - 1)
       })
       this.contactsData = this.form.orderItemsList
       this.sumOrderNo();
@@ -577,12 +592,13 @@ export default {
     },
     //查询库存
     selectInventory(row) {
-      if (row.billNo && row.contractNumber && row.priceCategory && this.form.storageId) {
+      if (row.billNo && row.contractNumber && row.priceCategory && row.cntrNo && this.form.storageId) {
         const params = {
           billNo: row.billNo,
           contractNumber: row.contractNumber,
           priceCategory: row.priceCategory,
           storageId: this.form.storageId,
+          cntrNo: row.cntrNo
         }
         selectGoodsNum(params).then(res => {
           this.$set(this.contactsData[row.$index], "inventoryNumber", res.data.data)

+ 0 - 1
src/views/purchase/contract/config/customerContact.json

@@ -129,7 +129,6 @@
       "prop": "taxRate",
       "index": 10,
       "width":120,
-      "cell": true,
       "rules": [
         {
           "required": false,

+ 36 - 22
src/views/purchase/contract/detailsPage.vue

@@ -76,9 +76,15 @@
                 <el-select v-else-if="item.prop === 'currency'" style="width: 100%"    v-model="form[item.prop]" size="small" placeholder="请选择" @change="currencyChange" clearable filterable>
                   <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
                 </el-select>
+                <el-input type="age" v-else-if="item.type === 'unit'" v-model="form[item.prop]"  :disabled="item.disabled?true:false" size="small" autocomplete="off"  @change="currencyChange" placeholder="请输入">
+                  <template   slot="append">%</template>
+                </el-input>
                 <el-select v-else-if="item.prop === 'paymentType'"  style="width: 100%"  v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
                   <el-option v-for="(item,index) in paymentTypeDic" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
+                <!--<div v-else-if="item.prop === 'advancePayment'">
+                  <el-input type="textarea" v-else-if="(item.prop === 'advancePayment')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder="请输入"></el-input>
+                </div>-->
                 <el-input type="textarea" v-else-if="(item.prop === 'orderRemark')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder="请输入"></el-input>
                 <el-input type="age" v-else v-model="form[item.prop]" :disabled="item.disabled?true:false || takeDisabled" size="small" autocomplete="off" placeholder="请输入"></el-input>
               </el-form-item>
@@ -198,6 +204,17 @@
               ></el-input>
               <span v-else>{{ row.amount }}</span>
             </template>
+            <template slot="taxRate" slot-scope="{ row }">
+              <el-input v-if="row.$cellEdit"
+                        v-model="row.taxRate"
+                        size="small"
+                        autocomplete="off"
+                        placeholder="请输入">
+                <template slot="append"
+                >%</template>
+              </el-input>
+              <span v-else>{{ row.taxRate }}</span>
+            </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
                 type="text"
@@ -249,7 +266,7 @@
       append-to-body
       class="el-dialogDeep"
       :visible.sync="applicationDialog"
-      width="70%"
+      width="60%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false"
@@ -286,20 +303,16 @@
 import customerContact from "./config/customerContact.json"
 import uploadList from './config/uploadList.json'
 import advantageProject from "./config/advantageProject.json"
-import {getDeptLazyTree,customerList} from "@/api/basicData/basicFeesDesc";
+import { getDeptLazyTree } from "@/api/basicData/basicFeesDesc";
 import optionTwoCost from "./config/mainListCost.json"
-import {detailListData, submitData,getSysNo} from "@/api/importTrade/purchase";
-import commodity from "./config/commodity.json"
+import {detailListData, submitData} from "@/api/importTrade/purchase";
 import feeInfo from "@/components/fee-info/main";
 import uploadFile from "@/components/upload-file/main";
 import _ from "lodash";
 import  billApplication from "@/components/bill/billApplication";
 //商品详情接口
-import {corpsattn, corpsbank,  getDeptLazyTreeS} from "@/api/basicData/configuration"
-import { getList } from "@/api/basicData/commodityType"
+import { corpsattn } from "@/api/basicData/configuration"
 import { contrastObj,contrastList } from "@/util/contrastData";
-import {getSpecification} from "@/api/exportTrade/purchaseContract";
-import option from "./config/mainList.json";
 import ApplyPayment from "../../../components/finance/applyPayment";
 export default {
   name: "detailsPage",
@@ -457,7 +470,7 @@ export default {
             disabled:this.takeDisabled,
             rules: [
               {
-                required: false,
+                required: true,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -589,6 +602,7 @@ export default {
             prop: 'currency'
           }, {
             label: '汇率',
+            type:"unit",
             prop: 'exchangeRate',
           }, {
             label: '人民币金额',
@@ -758,20 +772,20 @@ export default {
     },
     //带出人民币
     currencyChange(){
-      if(this.form.orderAmount){
-        if(this.form.currency === "CNY"){
-          this.form.exchangeRate = 1
+      if(this.form.currency === "CNY" && this.form.exchangeRate == 6.368600){  //如果为人民币
+        this.form.exchangeRate = 1
+        if(this.form.orderAmount){   //合同金额不为0  赋值人民币金额
           this.$set(this.form,"rmbAmount",this.form.orderAmount)
-        }else{
-          if(this.form.exchangeRate != 6.368600){
-            this.$set(this.form,"rmbAmount",_.multiply(this.form.orderAmount, this.form.exchangeRate).toFixed(2))
-          }else{
-            this.form.exchangeRate = 6.3686
+        }
+      }else if(this.form.exchangeRate === 1){
+          this.form.exchangeRate = 6.3686
+          if(this.form.orderAmount){
             this.$set(this.form,"rmbAmount",_.multiply(this.form.orderAmount, 6.3686).toFixed(2))
           }
-        }
       }else{
-        this.$set(this.form,"rmbAmount","")
+        if(this.form.orderAmount && this.form.exchangeRate){
+          this.$set(this.form,"rmbAmount",_.multiply(this.form.orderAmount, this.form.exchangeRate).toFixed(2))
+        }
       }
     },
     //合计
@@ -888,7 +902,7 @@ export default {
         if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
           || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
         ){
-          this.$confirm("您已改动数据,是否先保存在进行操作!", {
+          this.$confirm("数据发生变化,请先提交保存?", {
             confirmButtonText: "保存",
             cancelButtonText: "取消",
             type: "warning"
@@ -964,7 +978,7 @@ export default {
       if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
         || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
       ){
-        this.$confirm("您已改动数据,是否先保存在进行操作!", {
+        this.$confirm("数据发生变化,请先提交保存?", {
           confirmButtonText: "保存",
           cancelButtonText: "取消",
           type: "warning"
@@ -1040,7 +1054,7 @@ export default {
       if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
         || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
       ){
-        this.$confirm("是否保存当前页面?", "提示", {
+        this.$confirm("数据发生变化,是否提交保存?", "提示", {
           confirmButtonText: "保存",
           cancelButtonText: "取消",
           type: "warning",

+ 78 - 84
src/views/purchase/stockBill/config/mainList.json

@@ -7,7 +7,8 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
-  "searchMenuSpan": 6,
+  "searchSpan": 8,
+  "searchMenuSpan": 16,
   "tree": true,
   "selection": false,
   "addBtn": false,
@@ -15,140 +16,133 @@
   "editBtn": false,
   "delBtn": false,
   "menuWidth": 150,
+  "menu": false,
+  "searchIcon": true,
+  "searchIndex": 2,
   "searchLabelWidth": 100,
-  "column": [
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
     {
-      "label": "状态",
-      "hide": true,
-      "prop": "status",
-      "search": true,
-      "width": 120,
-      "type": "select",
-      "dicData": [
-        {
-          "label": "已审核",
-          "value": "1"
-        },
-        {
-          "label": "正在结算",
-          "value": "4"
-        },
-        {
-          "label": "结算完成",
-          "value": "5"
-        }
-      ]
+      "name": "inAmount",
+      "type": "sum"
     },
     {
-      "label": "状态",
-      "prop": "strStatus",
-      "type": "select",
-      "overHidden": true,
-      "searchOrder": 5,
-      "width": 120
+      "name": "outAmount",
+      "type": "sum"
     },
     {
-      "label": "客户名称",
+      "name": "balanceAmount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "合同号",
+      "prop": "contractNumber",
       "overHidden": true,
-      "prop": "cornName",
-      "width": 220
+      "search": true,
+      "index": 1,
+      "width": 150
     },
     {
-      "label": "客户名称",
-      "hide": true,
+      "label": "提单号",
+      "overHidden": true,
       "search": true,
-      "prop": "cornId",
-      "searchOrder": 1
+      "prop": "billNo",
+      "index": 2,
+      "width": 150
     },
     {
-      "label": "服务项目",
-      "prop": "pname",
+      "label": "货物名称",
+      "search": true,
       "overHidden": true,
-      "width": 120
+      "index": 3,
+      "width": 220,
+      "prop": "cname"
     },
     {
-      "label": "任务部门",
-      "prop": "deptName",
+      "label": "箱号",
+      "prop": "cntrNo",
+      "index": 4,
       "overHidden": true,
       "width": 120
     },
     {
-      "label": "单价",
-      "prop": "price",
+      "label": "采购日期",
+      "search": true,
+      "prop": "createTime",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "type": "date",
+      "unlinkPanels": true,
+      "searchRange": true,
       "overHidden": true,
-      "width": 120
+      "index": 5,
+      "width": 150
     },
     {
-      "label": "计价单位",
-      "prop": "unit",
+      "label": "入库件数",
+      "prop": "inQuantity",
       "overHidden": true,
+      "index": 6,
       "width": 120
     },
     {
-      "label": "量",
-      "prop": "quantity",
+      "label": "入库发票重量",
+      "prop": "inWeight",
       "overHidden": true,
+      "index": 7,
       "width": 120
     },
     {
-      "label": "合计金额",
-      "prop": "amount",
+      "label": "入库金额",
+      "prop": "inAmount",
       "overHidden": true,
+      "index": 8,
       "width": 120
     },
     {
-      "label": "频率",
-      "prop": "frequency",
+      "label": "出库件数",
+      "prop": "outQuantity",
       "overHidden": true,
+      "index": 9,
       "width": 120
     },
     {
-      "label": "提醒日",
-      "prop": "reminderDay",
-      "valueFormat": "timestamp",
+      "label": "出库发票重量",
+      "prop": "outWeight",
       "overHidden": true,
-      "type": "date",
-      "width": 150
+      "index": 10,
+      "width": 120
     },
     {
-      "label": "需求开始日期",
-      "prop": "beginTime",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
-      "type": "date",
-      "unlinkPanels": true,
-      "searchRange": true,
-      "search": true,
+      "label": "出库金额",
+      "prop": "outAmount",
       "overHidden": true,
-      "searchOrder": 3,
-      "width": 150,
-      "cell": true
+      "index": 11,
+      "width": 120
     },
     {
-      "label": "制单人",
-      "prop": "createUserName",
-      "disabled": true,
+      "label": "结余件数",
+      "prop": "balanceQuantity",
       "overHidden": true,
+      "index": 12,
       "width": 120
     },
     {
-      "label": "制单日期",
-      "prop": "createTime",
-      "disabled": true,
+      "label": "结余重量",
+      "prop": "balanceWeight",
       "overHidden": true,
-      "width": 150
-    },
-    {
-      "label": "最新修改人",
-      "prop": "updateUserName",
-      "width": 120,
-      "overHidden": true
+      "index": 13,
+      "width": 120
     },
     {
-      "label": "最新修改时间",
-      "prop": "updateTime",
-      "width": 150,
-      "overHidden": true
+      "label": "结余金额",
+      "prop": "balanceAmount",
+      "overHidden": true,
+      "index": 14,
+      "width": 120
     }
   ]
 }

+ 14 - 13
src/views/purchase/stockBill/index.vue

@@ -20,7 +20,7 @@
 
 <script>
   import option from "./config/mainList.json";
-  import { getBillList } from "@/api/financialManagement/paymentRequest";
+  import {customerList} from "@/api/basicData/inventoryAccount"
 
   export default {
     data() {
@@ -45,7 +45,6 @@
 
     },
     mounted() {
-      option.height = window.innerHeight - 200 ;
     },
     methods: {
       //新单打开
@@ -90,17 +89,19 @@
         console.log('1')
       },
       onLoad(page, params = {}) {
-        // this.loading = true;
-        // if (params.createTime != undefined) {  //合同
-        //   params.createStartDate = params.createTime[0]+ " " + "00:00:00";
-        //   params.createEndDate = params.createTime[1] + " " + "23:59:59";
-        //   this.$delete(params,'createTime')
-        // }
-        // getBillList(page.currentPage, page.pageSize,params).then(res=>{
-        //   this.dataList = res.data.data.records
-        //   this.page.total = res.data.data.total
-        //   this.loading = false;
-        // })
+        this.loading = true;
+        if(params){
+          if (params.createTime!= undefined) {  //付款
+            params.createStartTime = params.createTime[0]+ " " + "00:00:00";
+            params.createEndTime = params.createTime[1] + " " + "23:59:59";
+            this.$delete(params,'createTime')
+          }
+        }
+        customerList(page.currentPage, page.pageSize,params).then(res=>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+          this.loading = false;
+        })
       },
     }
   }

+ 21 - 9
src/views/salesManagement/salesContract/detailsPage.vue

@@ -60,7 +60,7 @@
                 </el-select>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
                 <selectComponent v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]" :configuration="bConfiguration"/>
-                <el-input type="age" v-else-if="item.prop === 'downPayment'" v-model="form[item.prop]"  @change="downPaymentChange"  :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入">
+                <el-input type="age" v-else-if="item.type === 'unit'" v-model="form[item.prop]"  @change="downPaymentChange"  :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入">
                   <template slot="append">%</template>
                 </el-input>
                 <el-input type="textarea" v-else-if="(item.prop === 'orderRemark')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder="请输入"></el-input>
@@ -116,10 +116,12 @@
               <span v-else>{{ row.orgOrderNo }}</span>
             </template>
             <template slot="price" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.price"
                 placeholder="请输入"
+                style="width: 90%"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
                 @input="priceChange(row)"
@@ -127,6 +129,7 @@
               <span v-else>{{ row.price }}</span>
             </template>
             <template slot="orderQuantity" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.orderQuantity"
@@ -138,7 +141,9 @@
               <span v-else>{{ row.orderQuantity }}</span>
             </template>
             <template slot="priceCategory" slot-scope="{row,index}">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <goods-select
+                style="width:90% !important;"
                 v-if="row.$cellEdit"
                 v-model="row.priceCategoryNames"
                 @valueName="(value) => valueName(value,row)"
@@ -148,9 +153,11 @@
               <span v-else>{{ row.priceCategoryNames }}</span>
             </template>
             <template slot="invoiceWeight" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.invoiceWeight"
+                style="width: 90%"
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
@@ -159,10 +166,12 @@
               <span v-else>{{ row.invoiceWeight }}</span>
             </template>
             <template slot="billWeight" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.billWeight"
                 placeholder="请输入"
+                style="width: 90%"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
                 @input="billWeightChange(row)"
@@ -171,10 +180,12 @@
               <span v-else>{{ row.billWeight }}</span>
             </template>
             <template slot="amount" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.amount"
                 placeholder="请输入"
+                style="width: 90%"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
               ></el-input>
@@ -449,6 +460,7 @@ export default {
             prop: 'currency',
           }, {
             label: '汇率',
+            type:"unit",
             prop: 'exchangeRate',
             rules: [
               {
@@ -472,6 +484,7 @@ export default {
           },
           {
             label: '首付比例',
+            type:"unit",
             prop: 'downPayment',
             rules: [
               {
@@ -717,14 +730,13 @@ export default {
     },
     //汇率
     currencyChange(value){
-      if(this.form.orderAmount){
-        if(value === "CNY"){
-          this.form.exchangeRate = 1
-          // this.form.rmbAmount = this.form.orderAmount
-        }else{
-          this.form.exchangeRate = 6.3843
-          // this.form.rmbAmount =  _.multiply(this.form.orderAmount, 6.3843)
-        }
+      if(value === "CNY" &&  this.form.exchangeRate ==6.384300){
+        this.$set(this.form,"exchangeRate",1)
+        this.form.exchangeRate = 1
+        // this.form.rmbAmount = this.form.orderAmount
+      }else if( this.form.exchangeRate ===  1){
+        this.$set(this.form,"exchangeRate",6.384300)
+        // this.form.rmbAmount =  _.multiply(this.form.orderAmount, 6.3843)
       }
     },
     //单价