qukaidi 2 anos atrás
pai
commit
8e35ee10a6

+ 7 - 0
src/api/basicData/agreement.js

@@ -73,4 +73,11 @@ export function getLazylist(data) {
     method: 'get',
     params: data
   })
+}
+export const itemsubmit = (row) => {
+  return request({
+    url: '/api/trade-purchase/agreementitems/submit',
+    method: 'post',
+    data: row
+  })
 }

+ 8 - 1
src/views/InventoryManagement/inventory/config/customerContact.json

@@ -124,7 +124,14 @@
       "width": 100
     },
     {
-      "index":  15,
+      "index": 15,
+      "prop": "surplusLoss",
+      "label": "盈亏量",
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index":  16,
       "prop": "remarks",
       "label": "备注",
       "overHidden": true,

+ 0 - 7
src/views/InventoryManagement/inventory/config/mainList.json

@@ -19,7 +19,6 @@
       "label": "盘点单号",
       "prop": "sysNo",
       "index": 2,
-      "width": 120,
       "search": true,
       "searchSpan": 8,
       "overHidden": true
@@ -28,7 +27,6 @@
       "label": "盘点日期",
       "prop": "stockTime",
       "index": 4,
-      "width": 120,
       "type": "date",
       "format": "yyyy-MM-dd",
       "search": true,
@@ -48,7 +46,6 @@
       "showAllLevels": false,
       "emitPath": false,
       "index": 5,
-      "width": 120,
       "search": true,
       "searchSpan": 8,
       "overHidden": true
@@ -57,21 +54,18 @@
       "label": "制单人",
       "prop": "salesName",
       "index": 11,
-      "width": 120,
       "overHidden": true
     },
     {
       "label": "创建时间",
       "prop": "createTime",
       "index": 12,
-      "width": 120,
       "overHidden": true
     },
     {
       "label": "审核状态",
       "prop": "status",
       "index": 13,
-      "width": 120,
       "type": "select",
       "dataType": "number",
       "props": {
@@ -87,7 +81,6 @@
       "label": "备注",
       "prop": "orderRemark",
       "index": 14,
-      "width": 120,
       "search": true,
       "searchSpan": 8,
       "overHidden": true

+ 17 - 5
src/views/InventoryManagement/inventory/detailsPage.vue

@@ -14,7 +14,7 @@
           size="small">保存数据
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
-          <el-button type="primary" size="small" :loading="buttonLoading" :disabled="!form.id">
+          <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
@@ -25,7 +25,7 @@
         </el-dropdown>
       </div>
     </div>
-    <div class="customer-main">
+    <div class="customer-main" v-loading="subLoading">
       <trade-card title="基础信息">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="purchaserId">
@@ -52,10 +52,16 @@
                 :disabled="disabled || detailData.status == 1">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
             </div>
           </template>
+          <template slot="inventoryForm" slot-scope="{ row,disabled }">
+            <el-input-number size="small" v-model="row.inventory" @change="calculateChange(row)" :controls="false"
+              style="width:100%" placeholder="请输入"></el-input-number>
+          </template>
         </avue-crud>
       </trade-card>
-      <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 1" :orderFilesList="orderFilesList"
-        delUrl="" />
+      <containerTitle title="上传附件"></containerTitle>
+      <c-upload typeUpload="CD" deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId"
+        :data="orderFilesList" display :enumerationValue="85.6" :disabled="detailData.status == 1"></c-upload>
+
       <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
         :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
         <check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
@@ -73,6 +79,7 @@ import checkSchedule from "../../../components/check/checkSchedule";
 import uploadFile from "@/components/upload-file/main";
 import { getCurrentDate } from "@/util/date";
 import { getToken } from "@/util/auth";
+import { number } from "echarts";
 export default {
   name: "detailsPageEdit",
   data() {
@@ -192,6 +199,11 @@ export default {
     cellStyle() {
       return "padding:0;height:40px;";
     },
+    calculateChange(row) {
+      row.balanceNumber = Number(row.inventory ? row.inventory : 0)
+      row.surplusLoss = Number(row.inventory ? row.inventory : 0)-Number(row.balanceNumber ? row.balanceNumber : 0)
+      row.balanceMoney=Number(row.price?row.price:0)*Number(row.row.balanceNumber)
+    },
     getStorage() {
       getStorage({ storageTypeId: this.form.storageId }).then(res => {
         this.findObject(this.tableOption.column, "storageId").dicData = res.data;
@@ -285,7 +297,7 @@ export default {
           delete res.data.data.createUserName
           delete res.data.data.sysNo
           delete res.data.data.status
-          res.data.data.stockTime=getCurrentDate()
+          res.data.data.stockTime = getCurrentDate()
           res.data.data.itemsVOList.forEach(e => {
             delete e.id
           })

+ 18 - 6
src/views/InventoryManagement/inventory/index.vue

@@ -20,7 +20,7 @@
                     </el-date-picker>
                 </template>
                 <template slot-scope="{ row,index}" slot="sysNo">
-                    <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.purchaser }}
+                    <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.sysNo }}
                     </span>
                 </template>
                 <template slot-scope="{ row,index}" slot="corpId">
@@ -50,6 +50,11 @@
                         <span>{{ row.corpName }}
                         </span>
                     </template>
+                    <template slot="stockTimeSearch">
+                    <el-date-picker v-model="search2.stockTime" type="daterange" start-placeholder="开始日期"
+                        end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
+                    </el-date-picker>
+                </template>
                 </avue-crud>
             </span>
             <span slot="footer" class="dialog-footer">
@@ -131,10 +136,9 @@ export default {
         })
     },
     activated() {
-        console.log(this.show)
         setTimeout(() => {
-            if (this.$route.query.generateId && this.show) {
-                // this.detailData.id = this.$route.query.generateId
+            if (this.$route.query.check && this.show) {
+                this.editOpen({id:this.$route.query.check.srcBillId},1)
                 this.show = false;
             }
         }, 100);
@@ -224,7 +228,15 @@ export default {
             this.page2.pageSize = val;
         },
         onLoad(page, params) {
+            if (this.search.stockTime && this.search.stockTime.length > 0) {
+                params = {
+                    ...params,
+                    createStartTime: this.search.stockTime[0]+' '+"00:00:00",
+                    createEndTime: this.search.stockTime[1]+' '+"23:59:59"
+                };
+            }
             let data = this.deepClone(Object.assign({}, params, this.search));
+            delete data.stockTime;
             data.billType = "PD"
             this.loading = true;
             getList(page.currentPage, page.pageSize, data)
@@ -240,8 +252,8 @@ export default {
             if (this.search2.stockTime && this.search2.stockTime.length > 0) {
                 params = {
                     ...params,
-                    createStartTime: this.search.stockTime[0] + ' ' + "00:00:00",
-                    createEndTime: this.search.stockTime[1] + ' ' + "23:59:59"
+                    createStartTime: this.search2.stockTime[0] + ' ' + "00:00:00",
+                    createEndTime: this.search2.stockTime[1] + ' ' + "23:59:59"
                 };
             }
             let data = this.deepClone(Object.assign({}, params, this.search2));

+ 28 - 9
src/views/basicData/agreement/detailsPage.vue

@@ -31,7 +31,7 @@
       <containerTitle title="基础明细"></containerTitle>
       <basic-container v-loading="loadingBtn">
         <avue-crud ref="crud" :option="optionList" :data="dataList" :table-loading="loading" @saveColumn="saveColumn"
-          @resetColumn="resetColumn" :cell-style="cellStyle">
+          @resetColumn="resetColumn" :cell-style="cellStyle"  @row-save="rowSave" @row-update="addUpdate">
           <template slot="menuLeft">
             <el-button type="primary" @click="addRow" size="small" :disabled="detailData.status == 1">新增
             </el-button>
@@ -58,7 +58,7 @@
 
 <script>
 import { optionList } from "./js/optionList";
-import { getDetail, submit, getStoragetree, getAllgoodstype, getLazylist } from "@/api/basicData/agreement";
+import { getDetail, submit, getStoragetree, getAllgoodstype, getLazylist,itemsubmit } from "@/api/basicData/agreement";
 export default {
   name: "index",
   data() {
@@ -143,7 +143,7 @@ export default {
             span: 6,
           },
           {
-            label: "商品分类",
+            label: "商品名称",
             prop: "goodsId",
             type: "select",
             dataType: "string",
@@ -288,13 +288,32 @@ export default {
     addRow() {
       this.dataList.push({ $cellEdit: true });
     },
+    // rowCell(row, index) {
+    //   if (row.$cellEdit == true) {
+    //     this.editCustomer();
+    //     this.$set(row, "$cellEdit", false);
+    //   } else {
+    //     this.$set(row, "$cellEdit", true);
+    //   }
+    // },
     rowCell(row, index) {
-      if (row.$cellEdit == true) {
-        this.editCustomer();
-        this.$set(row, "$cellEdit", false);
-      } else {
-        this.$set(row, "$cellEdit", true);
-      }
+      this.$refs.crud.rowCell(row, index)
+    },
+    rowSave(form, done) {
+      done()
+      this.itemsubmit(form)
+    },
+    addUpdate(form, index, done, loading) {
+      done()
+      this.itemsubmit(form)
+    },
+    itemsubmit(row){
+      itemsubmit({
+        pid:this.form.id,
+        ...row
+      }).then(res=>{
+         this.$message.success("保存成功");
+      })
     },
     rowDel(row, index) {
       this.$confirm("确定删除数据?", {

+ 36 - 1
src/views/basicData/agreement/js/optionList.js

@@ -72,6 +72,13 @@ export const optionList = {
       label: "费用名称",
       prop: "feeId",
       overHidden: true,
+      rules: [
+        {
+          required: true,
+          message: "",
+          trigger: blur
+        }
+      ],
       width: 150,
     },
     {
@@ -84,8 +91,15 @@ export const optionList = {
         value: "dictKey"
       },
       dicData: [],
-      dataType:'number',
+      dataType: 'number',
       cell: true,
+      rules: [
+        {
+          required: true,
+          message: "",
+          trigger: blur
+        }
+      ],
       width: 120,
     },
     {
@@ -93,6 +107,13 @@ export const optionList = {
       prop: "fromDays",
       overHidden: true,
       cell: true,
+      rules: [
+        {
+          required: true,
+          message: "",
+          trigger: blur
+        }
+      ],
       width: 120,
     },
     {
@@ -100,6 +121,13 @@ export const optionList = {
       prop: "enDays",
       overHidden: true,
       cell: true,
+      rules: [
+        {
+          required: true,
+          message: "",
+          trigger: blur
+        }
+      ],
       width: 120,
     },
     {
@@ -107,6 +135,13 @@ export const optionList = {
       prop: "price",
       overHidden: true,
       cell: true,
+      rules: [
+        {
+          required: true,
+          message: "",
+          trigger: blur
+        }
+      ],
       width: 120,
     },
     {

+ 12 - 1
src/views/financing/financingLedger/js/optionList.js

@@ -1,6 +1,6 @@
 export const option ={
   searchShow: true,
-  searchMenuSpan: 16,
+  searchMenuSpan: 8,
   align: "center",
   searchSpan: 8,
   tip: false,
@@ -21,6 +21,17 @@ export const option ={
       searchSpan: 8,
     },
     {
+      label: "融资日期",
+      prop: "financingDate",
+      type: "month",
+      format: 'yyyy-MM',
+      valueFormat: 'yyyy-MM-01 00:00:00',
+      search: true,
+      hide:true,
+      showColumn:false,
+      searchSpan: 8,
+    },
+    {
       label: "上期结余金额",
       prop: "lastIssueAmount",
     },

+ 2 - 2
src/views/financing/financingManagement/detailsPage.vue

@@ -14,7 +14,7 @@
           size="small">{{ form.id ? '修改数据' : '保存数据' }}
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
-          <el-button type="primary" size="small" :loading="buttonLoading" :disabled="!form.id">
+          <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
@@ -25,7 +25,7 @@
         </el-dropdown>
       </div>
     </div>
-    <div class="customer-main">
+    <div class="customer-main" v-loading="subLoading">
       <trade-card title="基础信息">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="corpId">

+ 15 - 13
src/views/financing/financingManagement/index.vue

@@ -18,13 +18,13 @@
         <template slot="corpIdSearch">
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
         </template>
-        <!-- <template slot="financingDateSearch">
+        <template slot="financingDateSearch">
           <el-date-picker v-model="search.financingDate" type="daterange" start-placeholder="开始日期"
             end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
           </el-date-picker>
-        </template> -->
+        </template>
         <template slot-scope="{ row, index }" slot="menu">
-          <el-button type="text" size="small" :disabled="row.status>0"  @click.stop="rowDel(row, index)">
+          <el-button type="text" size="small" :disabled="row.status>0" @click.stop="rowDel(row, index)">
             删除
           </el-button>
         </template>
@@ -76,12 +76,8 @@ export default {
   },
   activated() {
         setTimeout(() => {
-            if (this.$route.query.check && this.show) {
-              console.log(this.$route.query.check)
-                // this.detailData = {
-                //     id: this.$route.query.check
-                // }
-                this.editOpen(this.$route.query.check.srcBillId,1)
+          if (this.$route.query.check && this.show) {
+                this.editOpen({id:this.$route.query.check.srcBillId},1)
                 this.show = false;
             }
         }, 100);
@@ -112,13 +108,19 @@ export default {
     },
     onLoad(page, params = {}) {
       this.loading = true;
-      this.dataList.forEach(item => {
-        this.$refs.crud.toggleRowExpansion(item, false);
-      });
+      if (this.search.financingDate && this.search.financingDate.length > 0) {
+        params = {
+          ...params,
+          financingStartDate: this.search.financingDate[0] + ' ' + "00:00:00",
+          financingEndDate: this.search.financingDate[1] + ' ' + "23:59:59"
+        };
+      }
+      let data = this.deepClone(Object.assign({}, params, this.search));
+      delete data.financingDate;
       getList(
         page.currentPage,
         page.pageSize,
-        Object.assign(params, this.search)
+        data
       )
         .then(res => {
           this.dataList = res.data.data.records ? res.data.data.records : [];

+ 3 - 3
src/views/financing/financingManagement/js/optionList.js

@@ -27,9 +27,9 @@ export const option ={
     {
       label: "融资日期",
       prop: "financingDate",
-      type: "month",
-      format: 'yyyy-MM',
-      valueFormat: 'yyyy-MM-01 00:00:00',
+      type: "date",
+      format: 'yyyy-MM-dd',
+      valueFormat: 'yyyy-MM-dd',
       search: true,
       searchSpan: 8,
     },

+ 35 - 3
src/views/purchasingManagement/inStock/config/customerContact.json

@@ -165,9 +165,9 @@
       "label": "片数",
       "overHidden": true,
       "cell": true,
-      "type":"number",
-      "controls":false,
-      "precision":0,
+      "type": "number",
+      "controls": false,
+      "precision": 0,
       "rules": [
         {
           "required": true,
@@ -280,6 +280,38 @@
       "width": 100
     },
     {
+      "index": 22,
+      "prop": "balanceMoney",
+      "label": "结余金额",
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 23,
+      "prop": "isIssue",
+      "label": "库存状态",
+      "overHidden": true,
+      "dicData": [
+        {
+          "label": "待入库",
+          "value": "0"
+        },
+        {
+          "label": "已入库",
+          "value": "1"
+        },
+        {
+          "label": "待出库",
+          "value": "2"
+        },
+        {
+          "label": "已出库",
+          "value": "3"
+        }
+      ],
+      "width": 100
+    },
+    {
       "index": 24,
       "prop": "remarks",
       "label": "备注",

+ 3 - 3
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -91,11 +91,11 @@
                 打印</el-button>
               <div style="display:flex;flex-direction: column;justify-content: center;margin-left: 10px;">
                 <el-tooltip effect="dark" content="向上移动" placement="top">
-                  <i v-if="index != 0" :disabled="detailData.status == 1" class="el-icon-arrow-up"
+                  <i v-if="index != 0&&detailData.status != 1" :disabled="disabled || detailData.status == 1" class="el-icon-arrow-up"
                     @click="moveUp(row, index)" style="color:#409EFF;"></i>
                 </el-tooltip>
-                <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i v-if="index != (itemsVOList.length - 1)"
-                    :disabled="detailData.status == 1" class="el-icon-arrow-down" @click="moveDown(row, index)"
+                <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i v-if="index != (itemsVOList.length - 1)&&detailData.status != 1"
+                     class="el-icon-arrow-down" @click="moveDown(row, index)"
                     style="color:#409EFF;"></i></el-tooltip>
               </div>
             </div>

+ 8 - 0
src/views/purchasingManagement/inStock/index.vue

@@ -86,6 +86,14 @@ export default {
                 res.data.data;
         })
     },
+    activated() {
+        setTimeout(() => {
+            if (this.$route.query.check && this.show) {
+                this.editOpen({id:this.$route.query.check.srcBillId},1)
+                this.show = false;
+            }
+        }, 100);
+    },
     methods: {
         searchCriteriaSwitch(type) {
             if (type) {

+ 25 - 16
src/views/salesManagement/outStock/config/customerContact.json

@@ -127,14 +127,6 @@
       "width": 100
     },
     {
-      "index": 7,
-      "prop": "width",
-      "label": "宽度(mm)",
-      "overHidden": true,
-      "cell": true,
-      "width": 100
-    },
-    {
       "index": 8,
       "prop": "thickness",
       "label": "厚度(mm)",
@@ -143,14 +135,6 @@
       "width": 100
     },
     {
-      "index": 9,
-      "prop": "widthItem",
-      "label": "宽度明细(mm)",
-      "overHidden": true,
-      "cell": true,
-      "width": 100
-    },
-    {
       "index": 10,
       "prop": "billNo",
       "label": "捆包号",
@@ -251,6 +235,31 @@
       "width": 100
     },
     {
+      "index": 23,
+      "prop": "isIssue",
+      "label": "库存状态",
+      "overHidden": true,
+      "dicData": [
+        {
+          "label": "待入库",
+          "value": "0"
+        },
+        {
+          "label": "已入库",
+          "value": "1"
+        },
+        {
+          "label": "待出库",
+          "value": "2"
+        },
+        {
+          "label": "已出库",
+          "value": "3"
+        }
+      ],
+      "width": 100
+    },
+    {
       "index": 24,
       "prop": "remarks",
       "label": "备注",

+ 2 - 2
src/views/salesManagement/outStock/detailsPage.vue

@@ -92,10 +92,10 @@
                 打印</el-button> -->
               <div style="display:flex;flex-direction: column;justify-content: center;margin-left: 10px;">
                 <el-tooltip effect="dark" content="向上移动" placement="top">
-                  <i v-if="index != 0" :disabled="detailData.status == 1" class="el-icon-arrow-up"
+                  <i v-if="index != 0&&detailData.status != 1" :disabled="detailData.status == 1" class="el-icon-arrow-up"
                     @click="moveUp(row, index)" style="color:#409EFF;"></i>
                 </el-tooltip>
-                <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i v-if="index != (itemsVOList.length - 1)"
+                <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i v-if="index != (itemsVOList.length - 1)&&detailData.status != 1"
                     :disabled="detailData.status == 1" class="el-icon-arrow-down" @click="moveDown(row, index)"
                     style="color:#409EFF;"></i></el-tooltip>
               </div>

+ 1 - 4
src/views/salesManagement/outStock/index.vue

@@ -85,10 +85,7 @@ export default {
                 this.show = false;
             }
             if (this.$route.query.check && this.show) {
-                // this.detailData = {
-                //     id: this.$route.query.check
-                // }
-                this.editOpen(this.$route.query.check.srcBillId,1)
+                this.editOpen({id:this.$route.query.check.srcBillId},1)
                 this.show = false;
             }
         }, 100);