瀏覽代碼

修改仓库入库,仓库出库自定义列串了的问题

caojunjie 4 年之前
父節點
當前提交
0b3b962065

+ 258 - 241
src/views/purchaseIssue/index.vue

@@ -28,26 +28,26 @@
         :setRowList="setRowList"
         :tatolLabel="tatolLabel"
       />
-<!--      <el-pagination-->
-<!--        style="float: right;margin-top: 10px"-->
-<!--        @size-change="handleSizeChange"-->
-<!--        @current-change="handleCurrentChange"-->
-<!--        :page-sizes="[10, 20, 30, 50]"-->
-<!--        :page-size="this.formDataList.pageSize"-->
-<!--        background-->
-<!--        layout="sizes, prev, pager, next"-->
-<!--        :total="total"-->
-<!--      >-->
-<!--      </el-pagination>-->
+      <!--      <el-pagination-->
+      <!--        style="float: right;margin-top: 10px"-->
+      <!--        @size-change="handleSizeChange"-->
+      <!--        @current-change="handleCurrentChange"-->
+      <!--        :page-sizes="[10, 20, 30, 50]"-->
+      <!--        :page-size="this.formDataList.pageSize"-->
+      <!--        background-->
+      <!--        layout="sizes, prev, pager, next"-->
+      <!--        :total="total"-->
+      <!--      >-->
+      <!--      </el-pagination>-->
       <div style="float: right;margin-bottom: 10px">
-      <pagination
-        v-show="total > 0"
-        :total="total"
-        :page.sync="formDataList.pageNum"
-        :limit.sync="formDataList.pageSize"
-        @pagination="feedback('搜索')"
-        :page-sizes="[10,100,200,500,1000]"
-      />
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="formDataList.pageNum"
+          :limit.sync="formDataList.pageSize"
+          @pagination="feedback('搜索')"
+          :page-sizes="[10,100,200,500,1000]"
+        />
       </div>
     </div>
     <div v-else class="app-container">
@@ -59,8 +59,10 @@
               size="mini"
               type="danger" plain
               @click="backToList"
-              icon="el-icon-arrow-left">
-              返回列表</el-button>
+              icon="el-icon-arrow-left"
+            >
+              返回列表
+            </el-button>
           </el-breadcrumb-item>
         </el-breadcrumb>
       </div>
@@ -121,14 +123,14 @@
         <div ref="print" style="color: #000000">
           <h1 style="text-align: center;font-weight:bold">{{ formList.fsbuName }}</h1>
           <div style="display: flex;justify-content: space-between;margin-bottom: 10px">
-            <div style="width: 200px;height: 20px;font-size: 14px;">客户项目:{{projectName}}</div>
+            <div style="width: 200px;height: 20px;font-size: 14px;">客户项目:{{ projectName }}</div>
             <div style="width: 200px;height: 20px;font-size: 14px;">销售出库单</div>
-            <div style="width: 200px;height: 20px;font-size: 14px;">出库日期:{{formList.fBsdate}}</div>
+            <div style="width: 200px;height: 20px;font-size: 14px;">出库日期:{{ formList.fBsdate }}</div>
           </div>
           <div style="display: flex;justify-content: space-between;margin-bottom: 10px">
             <div style="width: 200px;height: 20px;font-size: 14px;">发货人:</div>
-            <div style="width: 200px;height: 20px;font-size: 14px;">公司电话:{{formList.fsbuTel}}</div>
-            <div style="width: 200px;height: 20px;font-size: 14px;">编号:{{formList.fBillno}}</div>
+            <div style="width: 200px;height: 20px;font-size: 14px;">公司电话:{{ formList.fsbuTel }}</div>
+            <div style="width: 200px;height: 20px;font-size: 14px;">编号:{{ formList.fBillno }}</div>
           </div>
           <table class="table table-striped table-bordered" align="center" valign="center">
             <tr>
@@ -142,13 +144,13 @@
               <td class="column" style="width: 10%;">备注</td>
             </tr>
             <tr v-for="(item,index) in contentList" :key="index">
-              <td class="column">{{ index+1 }}</td>
+              <td class="column">{{ index + 1 }}</td>
               <td class="column">{{ item.feeName }}</td>
               <td class="column"></td>
-              <td class="column">{{item.fFeeunitName}}</td>
+              <td class="column">{{ item.fFeeunitName }}</td>
               <td class="column">{{ item.fQty }}</td>
-              <td class="column">{{ item.fUnitprice?item.fUnitprice.toFixed(2):item.fUnitprice}}</td>
-              <td class="column">{{ item.fAmount?item.fAmount.toFixed(2):item.fAmount }}</td>
+              <td class="column">{{ item.fUnitprice ? item.fUnitprice.toFixed(2) : item.fUnitprice }}</td>
+              <td class="column">{{ item.fAmount ? item.fAmount.toFixed(2) : item.fAmount }}</td>
               <td class="column">{{ item.remark }}</td>
             </tr>
             <!--          <tr>-->
@@ -161,9 +163,11 @@
           <table class="table table-striped table-bordered" align="center" valign="center">
             <tr>
               <td class="column" colspan="2" style="border-top: none;width: 15%;">大写总金额:</td>
-              <td class="column" colspan="2" style="text-align: left;border-top: none;width: 40%;">{{chineseStr}}</td>
+              <td class="column" colspan="2" style="text-align: left;border-top: none;width: 40%;">{{ chineseStr }}</td>
               <td class="column" style="border-top: none; width: 15%;">小写总金额:</td>
-              <td class="column" colspan="3" style="border-top: none;text-align: left;width: 30%;">{{formList.fMoney?formList.fMoney.toFixed(2):formList.fMoney}}</td>
+              <td class="column" colspan="3" style="border-top: none;text-align: left;width: 30%;">
+                {{ formList.fMoney ? formList.fMoney.toFixed(2) : formList.fMoney }}
+              </td>
             </tr>
           </table>
           <div style="display: flex;justify-content: space-between;margin-top: 20px">
@@ -194,7 +198,7 @@ import {
   warehouse,
   listDelete,
   tableDeleteQuery,
-  confirmDeletion, pleaseCheck, revoke, queryUserVal, getName, revokeBill, copyNew,printingTiem
+  confirmDeletion, pleaseCheck, revoke, queryUserVal, getName, revokeBill, copyNew, printingTiem
 } from '@/api/purchaseIssue/index'
 import Cookies from 'js-cookie'
 import Global from '@/layout/components/global'
@@ -203,7 +207,7 @@ export default {
   name: 'index',
   data() {
     return {
-      form:{},
+      form: {},
       before: '',
       hasPermi: {
         lookup: ['anpin:stockControl:query'],
@@ -211,7 +215,7 @@ export default {
       },
       addOrUpdateVisib: false,
       addOrUpdateVisible: false,
-      chineseStr:0,
+      chineseStr: 0,
       total: 0,
       formDataList: {
         fBilltype: 'XS',
@@ -229,19 +233,19 @@ export default {
       setTimeout: '',
       searchWhether: true,
       pageDisplay: true,
-      projectName:'',
+      projectName: '',
       dataList: {
         fGoodsid: [],
         fSbu: [],
         fWarehouseid: [],
         fCorpid: [],
         fMarketTypid: [],
-        fFeeid:[]
+        fFeeid: []
       },
       contentList: [],
       inDex: 4,
       tableData: [],
-      selection:[],
+      selection: [],
       tableList: [],
       isItHidden: true,
       listStyle: [
@@ -340,7 +344,7 @@ export default {
           checked: 0,
           width: 100,
           onabort: ''
-        },{
+        }, {
           surface: '14',
           label: 'fsbuName',
           name: '开票公司',
@@ -353,7 +357,7 @@ export default {
           name: '操作',
           checked: 0,
           width: 160,
-          fixed:'right',
+          fixed: 'right',
           operation: '1',
           onabort: ''
         }
@@ -376,14 +380,14 @@ export default {
           onabort: '',
           disabled: false,
           changeable: 1
-        },{
+        }, {
           surface: '3',
           label: 'fCurrencyName',
           name: '规格',
           checked: 0,
           width: 100,
           onabort: '',
-          disabled: false,
+          disabled: false
         }, {
           surface: '4',
           label: 'fUnitprice',
@@ -420,7 +424,7 @@ export default {
           onabort: '',
           disabled: false,
           changeable: 1
-        },  {
+        }, {
           surface: '8',
           label: 'fAmount',
           name: '金额',
@@ -470,7 +474,7 @@ export default {
           name: '操作',
           checked: 0,
           disabled: false,
-          fixed:'right',
+          fixed: 'right',
           width: 160,
           operation: '2',
           onabort: ''
@@ -518,47 +522,47 @@ export default {
         }
       ],
       contentButton: [{
-          type: 'primary',
-          size: 'mini',
-          icon: 'el-icon-plus',
-          name: '录入明细',
-          disabled: false
-        }, {
-          type: 'primary',
-          size: 'mini',
-          icon: 'el-icon-plus',
-          name: '保存',
-          plain: true,
-          disabled: false
-        }, {
+        type: 'primary',
+        size: 'mini',
+        icon: 'el-icon-plus',
+        name: '录入明细',
+        disabled: false
+      }, {
+        type: 'primary',
+        size: 'mini',
+        icon: 'el-icon-plus',
+        name: '保存',
+        plain: true,
+        disabled: false
+      }, {
         type: 'primary',
         size: 'mini',
         icon: 'el-icon-edit-outline',
         name: '请核',
         disabled: false
-      },{
-          type: 'success',
-          size: 'mini',
-          icon: 'el-icon-edit',
-          name: '修改',
-          disabled: false
-        }, {
-          type: 'primary',
-          size: 'mini',
-          icon: 'el-icon-plus',
-          name: '新单',
-          nameTwo:'详情页',
-          plain: true,
-          disabled: false
-        },{
-          type: 'primary',
-          size: 'mini',
-          icon: 'el-icon-plus',
-          name: '复制新单',
-          nameTwo:'详情页',
-          plain: true,
-          disabled: false
-        },
+      }, {
+        type: 'success',
+        size: 'mini',
+        icon: 'el-icon-edit',
+        name: '修改',
+        disabled: false
+      }, {
+        type: 'primary',
+        size: 'mini',
+        icon: 'el-icon-plus',
+        name: '新单',
+        nameTwo: '详情页',
+        plain: true,
+        disabled: false
+      }, {
+        type: 'primary',
+        size: 'mini',
+        icon: 'el-icon-plus',
+        name: '复制新单',
+        nameTwo: '详情页',
+        plain: true,
+        disabled: false
+      },
         {
           type: 'primary',
           size: 'mini',
@@ -612,7 +616,7 @@ export default {
           width: 200,
           labelSize: '80',
           rules: [{ required: false, message: ' ' }]
-        },{
+        }, {
           span: 6,
           label: 'timeInterval',
           name: '出库日期',
@@ -620,7 +624,7 @@ export default {
           width: 200,
           labelSize: '80',
           rules: [{ required: false, message: ' ' }]
-        },{
+        }, {
           span: 6,
           label: 'createBy',
           name: '申请人',
@@ -636,7 +640,7 @@ export default {
           width: 200,
           labelSize: '80',
           rules: [{ required: false, message: ' ' }]
-        },{
+        }, {
           span: 6,
           label: 'fFeeid',
           name: '品名',
@@ -764,11 +768,11 @@ export default {
           rules: [{ required: false, message: ' ' }]
         }
       ],
-      pendingPage:'',
+      pendingPage: ''
     }
   },
   activated() {
-    if(this.$route.query.list){
+    if (this.$route.query.list) {
       this.pendingPage = JSON.parse(this.$route.query.list)
       this.homePage()
     }
@@ -790,7 +794,7 @@ export default {
         for (let item in res.rows) {
           this.dataList.fFeeid.push({
             label: res.rows[item].fName,
-            value: res.rows[item].fId,
+            value: res.rows[item].fId
           })
           this.listData.fFeeid.push({
             label: res.rows[item].fName,
@@ -852,94 +856,94 @@ export default {
     toChies(amount) { //形参
       this.chineseStr = 0
       // 汉字的数字
-      const cnNums = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"];
+      const cnNums = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']
       // 基本单位
-      const cnIntRadice = ["", "拾", "佰", "仟"];
+      const cnIntRadice = ['', '拾', '佰', '仟']
       // 对应整数部分扩展单位
-      const cnIntUnits = ["", "万", "亿", "兆"];
+      const cnIntUnits = ['', '万', '亿', '兆']
       // 对应小数部分单位
-      const cnDecUnits = ["角", "分"];
+      const cnDecUnits = ['角', '分']
       // 整数金额时后面跟的字符
-      const cnInteger = "整";
+      const cnInteger = '整'
       // 整型完以后的单位
-      const cnIntLast = "元";
+      const cnIntLast = '元'
       // 最大处理的数字
-      const maxNum = 9999999999999999.99;
+      const maxNum = 9999999999999999.99
       // 金额整数部分
-      let integerNum;
+      let integerNum
       // 金额小数部分
-      let decimalNum;
+      let decimalNum
       // 输出的中文金额字符串
-      let chineseStr = "";
+      let chineseStr = ''
       // 分离金额后用的数组,预定义
-      let parts;
-      if (amount === "") {
-        return "";
+      let parts
+      if (amount === '') {
+        return ''
       }
-      amount = parseFloat(amount);
+      amount = parseFloat(amount)
       if (amount >= maxNum) {
         // 超出最大处理数字
-        return "";
+        return ''
       }
       if (amount === 0) {
-        chineseStr = cnNums[0] + cnIntLast + cnInteger;
-        return chineseStr;
+        chineseStr = cnNums[0] + cnIntLast + cnInteger
+        return chineseStr
       }
       // 转换为字符串
-      amount = amount.toString();
-      if (amount.indexOf(".") === -1) {
-        integerNum = amount;
+      amount = amount.toString()
+      if (amount.indexOf('.') === -1) {
+        integerNum = amount
 
-        decimalNum = "";
+        decimalNum = ''
       } else {
-        parts = amount.split(".");
-        integerNum = parts[0];
-        decimalNum = parts[1].substr(0, 4);
+        parts = amount.split('.')
+        integerNum = parts[0]
+        decimalNum = parts[1].substr(0, 4)
       }
       // 获取整型部分转换
       if (parseInt(integerNum, 10) > 0) {
-        let zeroCount = 0;
-        const IntLen = integerNum.length;
+        let zeroCount = 0
+        const IntLen = integerNum.length
         for (let i = 0; i < IntLen; i++) {
-          const n = integerNum.substr(i, 1);
-          const p = IntLen - i - 1;
-          const q = p / 4;
-          const m = p % 4;
-          if (n === "0") {
-            zeroCount++;
+          const n = integerNum.substr(i, 1)
+          const p = IntLen - i - 1
+          const q = p / 4
+          const m = p % 4
+          if (n === '0') {
+            zeroCount++
           } else {
             if (zeroCount > 0) {
-              chineseStr += cnNums[0];
+              chineseStr += cnNums[0]
             }
             // 归零
-            zeroCount = 0;
+            zeroCount = 0
             //alert(cnNums[parseInt(n)])
-            chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
+            chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]
           }
           if (m === 0 && zeroCount < 4) {
-            chineseStr += cnIntUnits[q];
+            chineseStr += cnIntUnits[q]
           }
         }
-        chineseStr += cnIntLast;
+        chineseStr += cnIntLast
       }
       // 小数部分
-      if (decimalNum !== "") {
-        const decLen = decimalNum.length;
+      if (decimalNum !== '') {
+        const decLen = decimalNum.length
         for (let i = 0; i < decLen; i++) {
-          const n = decimalNum.substr(i, 1);
-          if (n !== "0") {
-            chineseStr += cnNums[Number(n)] + cnDecUnits[i];
+          const n = decimalNum.substr(i, 1)
+          if (n !== '0') {
+            chineseStr += cnNums[Number(n)] + cnDecUnits[i]
           }
         }
       }
-      if (chineseStr === "") {
-        chineseStr += cnNums[0] + cnIntLast + cnInteger;
-      } else if (decimalNum === "") {
-        chineseStr += cnInteger;
+      if (chineseStr === '') {
+        chineseStr += cnNums[0] + cnIntLast + cnInteger
+      } else if (decimalNum === '') {
+        chineseStr += cnInteger
       }
-      if (chineseStr[chineseStr.length-1] !== '整'){
+      if (chineseStr[chineseStr.length - 1] !== '整') {
         this.chineseStr = chineseStr + '整'
-      }else {
+      } else {
         this.chineseStr = chineseStr
       }
       // return chineseStr;
@@ -967,7 +971,7 @@ export default {
           }
         }
         this.viewMethod(scope)
-      }else{
+      } else {
         this.pageDisplay = true
       }
     },
@@ -989,20 +993,20 @@ export default {
     //首页审批跳转关闭返回首页
     cancelTwo() {
       let view = {}
-      if(this.pendingPage.pendingPage){
+      if (this.pendingPage.pendingPage) {
         view = {
-          fullPath: "/morePage/stock?open=true",
-          hash: "",
+          fullPath: '/morePage/stock?open=true',
+          hash: '',
           matched: Array(2),
           meta: Object,
-          name: "MorePage/stock",
+          name: 'MorePage/stock',
           params: Object,
-          path: "/morePage/stock",
+          path: '/morePage/stock',
           query: Object,
-          title: "待审数据"
+          title: '待审数据'
         }
         this.$router.push({ path: '/morePage/stock' })
-      }else {
+      } else {
         view = {
           fullPath: '/purchaseIssue',
           hash: '',
@@ -1065,16 +1069,16 @@ export default {
     query(data) {
       listQuery(data).then(res => {
         this.tableData = res.rows
-        this.tableData.forEach(item=>{
+        this.tableData.forEach(item => {
           console.log(item.fPrint)
           console.log(item.fPrintLog)
-          if(item.fPrint && item.fPrintLog){
+          if (item.fPrint && item.fPrintLog) {
             item.fPrintLog = item.fPrint + ',' + item.fPrintLog
-          }else if(item.fPrint || item.fPrintLog == null){
+          } else if (item.fPrint || item.fPrintLog == null) {
             item.fPrintLog = item.fPrint
-          }else if(item.fPrint==null || item.fPrintLog){
+          } else if (item.fPrint == null || item.fPrintLog) {
             item.fPrintLog = item.fPrintLog
-          }else{
+          } else {
             item.fPrintLog = ''
           }
           // item.fPrintLog = item.fPrint == null && item.fPrintLog == null ? '' :
@@ -1085,7 +1089,7 @@ export default {
       })
     },
     //查询列数据
-    getRow(data, list, add,i) {
+    getRow(data, list, add, i) {
       select(data).then((res) => {
         if (data.tableName === '销售出库详情') {
           if (res.data.length != 0) {
@@ -1096,12 +1100,12 @@ export default {
             // this.waitFor = true
           } else {
             // this.waitFor = true
-            this.$set(this.purchaseList,'columnList',this.$options.data().contentStyle)
+            this.$set(this.purchaseList, 'columnList', this.$options.data().contentStyle)
             this.setRowList = this.$options.data().contentStyle
           }
-          if(add){
+          if (add) {
             this.purchaseList.columnList.forEach(item => item.disabled = false)
-          }else{
+          } else {
             this.purchaseList.columnList.forEach(item => item.disabled = true)
           }
           this.pageDisplay = false
@@ -1115,7 +1119,7 @@ export default {
             this.queryList.columnList = this.queryList.columnList.filter((e) => e.checked == 0)
             // this.waitFor = true
           } else {
-            this.$set(this.queryList,'columnList',this.$options.data().listStyle)
+            this.$set(this.queryList, 'columnList', this.$options.data().listStyle)
             this.setRowList = this.$options.data().listStyle
           }
           this.$refs.avatar.form = this.form
@@ -1181,7 +1185,7 @@ export default {
                 this.contentButton[li].disabled = false
               }
             } else {
-              if (this.contentButton[li].name == '录入明细' || this.contentButton[li].name == '保存'||
+              if (this.contentButton[li].name == '录入明细' || this.contentButton[li].name == '保存' ||
                 this.contentButton[li].name == '请核' || this.contentButton[li].name == '修改') {
                 this.contentButton[li].disabled = true
               } else {
@@ -1193,7 +1197,7 @@ export default {
         if (i == 1) this.submitAnd()
       })
     },
-    submitAnd(){
+    submitAnd() {
       this.$refs.avatar.form.fId = ''
       this.$refs.avatar.form.fBillno = ''
       this.$refs.avatar.form.fCreateLog = ''
@@ -1201,7 +1205,7 @@ export default {
       this.$refs.avatar.form.fPrintLog = ''
       this.$refs.avatar.form.fBillstatus = 2
       this.$refs.avatar.form.fPrint = 0
-      this.contentList.forEach(item=>item.fId = '')
+      this.contentList.forEach(item => item.fId = '')
       this.contentOption.forEach(item => {
         if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
           item.disabled = true
@@ -1216,10 +1220,10 @@ export default {
     returnToForm(row) {
     },
     //查看
-    viewMethod(scope,res,i) {
+    viewMethod(scope, res, i) {
       console.log(res)
       if (this.form.length !== undefined) this.form = this.$refs.avatar.form
-      if(res){
+      if (res) {
         this.contentButton.forEach(item => {
           item.disabled = false
           this.purchaseList.columnList.forEach(item => item.disabled = false)
@@ -1232,7 +1236,7 @@ export default {
             }
           })
         })
-      }else{
+      } else {
         this.contentOption.forEach(item => item.disabled = true)
         this.contentStyle.forEach(item => item.disabled = true)
       }
@@ -1247,7 +1251,7 @@ export default {
             warehouseBills: res.data.warehouseBills,
             tWarehousebillsfees: res.data.tWarehousebillsfees
           }
-          this.getRow(data,list,'',i)
+          this.getRow(data, list, '', i)
         }
       })
     },
@@ -1301,15 +1305,15 @@ export default {
     },
     //选择框
     selectionbox(selection) {
-      if (selection.length > 1){
-        this.customButton.forEach(item =>{
-          if (item.name === '复制新单'){
+      if (selection.length > 1) {
+        this.customButton.forEach(item => {
+          if (item.name === '复制新单') {
             item.disabled = true
-          }else {
+          } else {
             item.disabled = false
           }
         })
-      }else {
+      } else {
         this.customButton.forEach(item => item.disabled = false)
         this.selection = selection
       }
@@ -1321,48 +1325,55 @@ export default {
       })
     },
     //详情内容保存
-    submitAndSave(item,res) {
-      if(this.$refs.avatar.form.fBillstatus <= 4 || !this.$refs.avatar.form.fBillstatus) {
-      let formData = new window.FormData()
-      this.$refs.avatar.form.fMoney = 0
-      this.contentList.forEach(item => this.$refs.avatar.form.fMoney += Number(item.fAmount))
-      formData.append('tWarehousebills', JSON.stringify(this.$refs.avatar.form))
-      formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
-      formData.append('fBilltype', 'XS')
-      if (item === 3){
-        this.$refs.avatar.form.fId = ''
-        this.$refs.avatar.form.fBillno = ''
-        this.$refs.avatar.form.fCreateLog = ''
-        this.$refs.avatar.form.fReviewDate = ''
-        this.$refs.avatar.form.fPrintLog = ''
-        this.$refs.avatar.form.fBillstatus = 2
-        this.$refs.avatar.form.fPrint = 0
-        this.contentList.forEach(item=>item.fId = '')
-        this.contentOption.forEach(item => {
-          if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
-            item.disabled = true
-          } else {
-            item.disabled = false
+    submitAndSave(item, res) {
+      if (this.$refs.avatar.form.fBillstatus <= 4 || !this.$refs.avatar.form.fBillstatus) {
+        console.log(this.$refs.avatar.form.fGoodsid)
+        console.log(this.dataList.fGoodsid)
+        let formData = new window.FormData()
+        this.$refs.avatar.form.fMoney = 0
+        this.contentList.forEach(item => this.$refs.avatar.form.fMoney += Number(item.fAmount))
+        this.dataList.fGoodsid.forEach(item => {
+          if (item.value == this.$refs.avatar.form.fGoodsid) {
+            this.$refs.avatar.form.fCorpid = item.fCorpid
           }
         })
-        this.purchaseList.columnList.forEach(item => item.disabled = false)
-        this.contentButton.forEach(item => item.disabled = false)
-        this.contentStyle.forEach(item => item.disabled = false)
-      }else {
-        submit(formData).then(res => {
-          if (res.code == 200) {
-            if(res){
-              this.$refs.avatar.form = res.data.warehouseBills
+        formData.append('tWarehousebills', JSON.stringify(this.$refs.avatar.form))
+        formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
+        formData.append('fBilltype', 'XS')
+        if (item === 3) {
+          this.$refs.avatar.form.fId = ''
+          this.$refs.avatar.form.fBillno = ''
+          this.$refs.avatar.form.fCreateLog = ''
+          this.$refs.avatar.form.fReviewDate = ''
+          this.$refs.avatar.form.fPrintLog = ''
+          this.$refs.avatar.form.fBillstatus = 2
+          this.$refs.avatar.form.fPrint = 0
+          this.contentList.forEach(item => item.fId = '')
+          this.contentOption.forEach(item => {
+            if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
+              item.disabled = true
+            } else {
+              item.disabled = false
             }
-            this.contentList = res.data.tWarehousebillsCntrs
-            this.$message.success('保存成功')
-          }
-        })
+          })
+          this.purchaseList.columnList.forEach(item => item.disabled = false)
+          this.contentButton.forEach(item => item.disabled = false)
+          this.contentStyle.forEach(item => item.disabled = false)
+        } else {
+          submit(formData).then(res => {
+            if (res.code == 200) {
+              if (res) {
+                this.$refs.avatar.form = res.data.warehouseBills
+              }
+              this.contentList = res.data.tWarehousebillsCntrs
+              this.$message.success('保存成功')
+            }
+          })
+        }
       }
-    }
-      if (item == 1){
+      if (item == 1) {
         this.dialogVisible = true
-      }else if (item === 2){
+      } else if (item === 2) {
         let data = {
           tableName: this.queryList.tableName,
           userId: Cookies.get('userName')
@@ -1370,7 +1381,7 @@ export default {
         this.getRow(data)
         this.query(this.formDataList)
       }
-      if (item === 3 && this.$refs.avatar.form.fBillstatus > 3){
+      if (item === 3 && this.$refs.avatar.form.fBillstatus > 3) {
         this.$refs.avatar.form.fId = ''
         this.$refs.avatar.form.fBillno = ''
         this.$refs.avatar.form.fCreateLog = ''
@@ -1378,7 +1389,7 @@ export default {
         this.$refs.avatar.form.fPrintLog = ''
         this.$refs.avatar.form.fBillstatus = 2
         this.$refs.avatar.form.fPrint = 0
-        this.contentList.forEach(item=>item.fId = '')
+        this.contentList.forEach(item => item.fId = '')
         this.contentOption.forEach(item => {
           if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
             item.disabled = true
@@ -1423,14 +1434,14 @@ export default {
     //确认打印
     Printing() {
       this.$print(this.$refs.print)
-      let list ={
-        fId:this.$refs.avatar.form.fId
+      let list = {
+        fId: this.$refs.avatar.form.fId
       }
-      printingTiem(list).then(res=>{
+      printingTiem(list).then(res => {
       })
     },
     //返回列表
-    backToList(){
+    backToList() {
       let data
       if (!this.$refs.avatar.form.fId && this.contentList !== 0 || this.$refs.avatar.form.fBillstatus >= 4 && !this.$route.query.data) {
         data = {
@@ -1448,7 +1459,7 @@ export default {
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          this.submitAndSave(2,1)
+          this.submitAndSave(2, 1)
         }).catch(() => {
           data = {
             tableName: this.queryList.tableName,
@@ -1464,15 +1475,15 @@ export default {
       let data
       switch (row.name) {
         case '新单':
-          if(row.nameTwo == '详情页'){
-            if(this.$refs.avatar.form.fId){
+          if (row.nameTwo == '详情页') {
+            if (this.$refs.avatar.form.fId) {
               this.contentList = []
               data = {
                 tableName: this.purchaseList.tableName,
                 userId: Cookies.get('userName')
               }
               this.$refs.avatar.form = {}
-              this.getRow(data,'',1)
+              this.getRow(data, '', 1)
               this.contentOption.forEach(item => {
                 if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
                   item.disabled = true
@@ -1484,17 +1495,17 @@ export default {
               this.contentStyle.forEach(item => item.disabled = false)
               this.$refs.avatar.clearVerification()
               this.$refs.avatar.form.createBy = Cookies.get('userName')
-            }else{
-              this.$message.error("当前数据未保存,请先保存")
+            } else {
+              this.$message.error('当前数据未保存,请先保存')
             }
-          }else{
+          } else {
             this.contentList = []
             data = {
               tableName: this.purchaseList.tableName,
               userId: Cookies.get('userName')
             }
             this.$refs.avatar.form = {}
-            this.getRow(data,'',1)
+            this.getRow(data, '', 1)
             this.contentOption.forEach(item => {
               if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
                 item.disabled = true
@@ -1510,19 +1521,19 @@ export default {
           }
           break
         case '复制新单':
-          if (row.nameTwo === '详情页'){
-            this.$refs.avatar.submitForm('submit',3)
-          }else {
-            if (this.selection.length > 0){
+          if (row.nameTwo === '详情页') {
+            this.$refs.avatar.submitForm('submit', 3)
+          } else {
+            if (this.selection.length > 0) {
               let scope = {
-                row:{
-                  fId:this.selection[0].fId
+                row: {
+                  fId: this.selection[0].fId
                 }
               }
               this.query(this.formDataList)
-              this.viewMethod(scope,'',1)
-            }else {
-              this.$message.warning('未选择列表,请选择后再点击');
+              this.viewMethod(scope, '', 1)
+            } else {
+              this.$message.warning('未选择列表,请选择后再点击')
             }
           }
           break
@@ -1540,7 +1551,7 @@ export default {
         case '修改':
           this.contentButton.forEach(item => {
             if (this.$refs.avatar.form.fBillstatus >= 4) {
-              if (item.name === '返回列表' || item.name === '修改' || item.name === '申请发票' || item.name === '查看审批' || item.name === '审批'|| item.name === '打印' || item.name === '撤销审批') {
+              if (item.name === '返回列表' || item.name === '修改' || item.name === '申请发票' || item.name === '查看审批' || item.name === '审批' || item.name === '打印' || item.name === '撤销审批') {
                 item.disabled = false
               } else {
                 item.disabled = true
@@ -1625,30 +1636,30 @@ export default {
         case '打印':
           // console.log(this.listData.fFeeid,this.contentList)
           this.formList.createBy = Cookies.get('userName')
-          for(let ul in this.dataList.fGoodsid){
-            if (this.$refs.avatar.form.fGoodsid == this.dataList.fGoodsid[ul].value){
+          for (let ul in this.dataList.fGoodsid) {
+            if (this.$refs.avatar.form.fGoodsid == this.dataList.fGoodsid[ul].value) {
               this.projectName = this.dataList.fGoodsid[ul].label
             }
           }
-          for (let item in this.contentList){
-            for (let li in this.listData.fFeeid){
-              if (this.contentList[item].fFeeid == this.listData.fFeeid[li].value){
+          for (let item in this.contentList) {
+            for (let li in this.listData.fFeeid) {
+              if (this.contentList[item].fFeeid == this.listData.fFeeid[li].value) {
                 this.contentList[item].feeName = this.listData.fFeeid[li].label
               }
             }
-            for(let i in this.listData.fFeeunitid){
-              if (this.contentList[item].fFeeunitid == this.listData.fFeeunitid[i].value){
+            for (let i in this.listData.fFeeunitid) {
+              if (this.contentList[item].fFeeunitid == this.listData.fFeeunitid[i].value) {
                 this.contentList[item].fFeeunitName = this.listData.fFeeunitid[i].label
               }
             }
           }
           this.toChies(this.$refs.avatar.form.fMoney)
-          if (!this.$refs.avatar.form.fId){
-            this.$message.error('未保存,不允许打印');
-          }else if (this.$refs.avatar.form.fBillstatus >= 4){
+          if (!this.$refs.avatar.form.fId) {
+            this.$message.error('未保存,不允许打印')
+          } else if (this.$refs.avatar.form.fBillstatus >= 4) {
             this.formList = this.$refs.avatar.form
             this.dialogVisible = true
-          }else {
+          } else {
             this.formList = this.$refs.avatar.form
             this.submitAndSave(1)
           }
@@ -1750,6 +1761,7 @@ export default {
   max-width: 100%;
   margin: 0 auto;
 }
+
 .table td {
   text-align: center;
   vertical-align: middle;
@@ -1761,19 +1773,24 @@ export default {
 .column {
   border: 1px solid #000;
 }
+
 .app-container >>> .el-form-item {
   margin-bottom: 0;
 }
-.print_div ::v-deep .el-table__body-wrapper{
+
+.print_div ::v-deep .el-table__body-wrapper {
   z-index: 2
 }
-.print_div ::v-deep .el-dialog__header{
+
+.print_div ::v-deep .el-dialog__header {
   padding: 0;
 }
-.print_div ::v-deep .el-dialog__body{
-   padding: 0 20px;
- }
-.app-container ::v-deep .el-table__body-wrapper{
+
+.print_div ::v-deep .el-dialog__body {
+  padding: 0 20px;
+}
+
+.app-container ::v-deep .el-table__body-wrapper {
   z-index: 2;
 }
 </style>

+ 17 - 11
src/views/reportAnalysis/inventoryAccount.vue

@@ -32,16 +32,16 @@
       :page-sizes="[10,100,200,500,1000]"
       @pagination="getList"
     />
-    <!--    <el-pagination-->
-    <!--      style="float: right;margin-top: 10px"-->
-    <!--      @size-change="handleSizeChange"-->
-    <!--      @current-change="handleCurrentChange"-->
-    <!--      :page-sizes="[10, 20, 30, 50]"-->
-    <!--      :page-size="this.formDataList.pageSize"-->
-    <!--      background-->
-    <!--      layout="sizes, prev, pager, next"-->
-    <!--      :total="total">-->
-    <!--    </el-pagination>-->
+<!--        <el-pagination-->
+<!--          style="float: right;margin-top: 10px"-->
+<!--          @size-change="handleSizeChange"-->
+<!--          @current-change="handleCurrentChange"-->
+<!--          :page-sizes="[10, 20, 30, 50]"-->
+<!--          :page-size="this.formDataList.pageSize"-->
+<!--          background-->
+<!--          layout="sizes, prev, pager, next"-->
+<!--          :total="total">-->
+<!--        </el-pagination>-->
   </div>
 </template>
 
@@ -382,7 +382,7 @@ export default {
     },
     //点击刷新会调用此方法
     getList() {
-      console.log('到我了2')
+      console.log(this.formDataList)
       queryData(this.formDataList).then(res=>{
         this.tableData = res.rows
         this.total = res.total
@@ -390,7 +390,13 @@ export default {
     },
     submitForm() {
       console.log(this.$refs.avatar.form)
+      let list ={
+        pageSize:this.formDataList.pageSize,
+        pageNum:this.formDataList.pageNum,
+      }
       this.formDataList = this.$refs.avatar.form
+      this.$set(this.formDataList,'pageSize',list.pageSize)
+      this.$set(this.formDataList,'pageNum',list.pageNum)
       this.getList()
     },
     returnToForm(row) {

+ 20 - 2
src/views/warehouse/inStock/index.vue

@@ -894,7 +894,9 @@ export default {
     }
     this.getRow(data)
     let list = {
-      fBilltype: 'RK'
+      fBilltype: 'RK',
+      pageNum: 1,
+      pageSize: 10
     }
     this.query(list)
     this.getList()
@@ -1193,7 +1195,7 @@ export default {
           }
           this.detailButton = this.$options.data().detailButton
           if (this.lander == this.detailForm.createBy && this.detailForm.fBillstatus == 6) {
-            console.log(this.detailForm.createBy)
+            // console.log(this.detailForm.createBy)
             this.detailButton.push({
               type: 'danger',
               size: 'mini',
@@ -1498,11 +1500,17 @@ export default {
     },
     //返回列表是否保存
     backRules() {
+      let data
       for (let li in this.detailOption) {
         if (this.detailOption[li].name == '供应商') {
           if (this.detailOption[li].disabled == true) {
+            data = {
+              tableName: this.queryList.tableName,
+              userId: Cookies.get('userName')
+            }
             this.inDex = 4
             this.getList()
+            this.getRow(data)
             this.isItHidden = true
             this.MainTable = false
           } else {
@@ -1513,10 +1521,15 @@ export default {
             }).then(() => {
               this.$refs.detailForm.saveRules('1')
             }).catch(() => {
+              data = {
+                tableName: this.queryList.tableName,
+                userId: Cookies.get('userName')
+              }
               this.inDex = 4
               this.isItHidden = true
               this.MainTable = false
               this.getList()
+              this.getRow(data)
             })
           }
         }
@@ -1561,6 +1574,11 @@ export default {
                 // })
               } else {
                 this.$message.success('保存成功')
+                let data = {
+                  tableName: this.queryList.tableName,
+                  userId: Cookies.get('userName')
+                }
+                this.getRow(data)
               }
             }
           })

+ 16 - 0
src/views/warehouse/outStock/index.vue

@@ -1503,11 +1503,17 @@ export default {
     },
     //返回列表是否保存
     backRules(){
+      let data
       for(let li in this.detailOption) {
         if(this.detailOption[li].name == '供应商'){
           if(this.detailOption[li].disabled == true){
+            data = {
+              tableName: this.queryList.tableName,
+              userId: Cookies.get('userName')
+            }
             this.inDex = 4
             this.getList();
+            this.getRow(data)
             this.isItHidden = true
             this.MainTable = false
           } else {
@@ -1518,10 +1524,15 @@ export default {
             }).then(() => {
               this.$refs.detailForm.saveRules('1')
             }).catch(() => {
+              data = {
+                tableName: this.queryList.tableName,
+                userId: Cookies.get('userName')
+              }
               this.inDex = 4
               this.isItHidden = true
               this.MainTable = false
               this.getList();
+              this.getRow(data)
             });
           }
         }
@@ -1566,6 +1577,11 @@ export default {
                 // })
               }else{
                 this.$message.success("保存成功")
+                let data = {
+                  tableName: this.queryList.tableName,
+                  userId: Cookies.get('userName')
+                }
+                this.getRow(data)
               }
             }
           })