Browse Source

Merge branch 'master' of http://git.echepei.com/zhujiawei/Warehouse_management_ui

tong 4 years ago
parent
commit
1c200c3487

+ 9 - 0
src/api/agreement/agreement.js

@@ -67,6 +67,15 @@ export function updateAgreement(data) {
   })
   })
 }
 }
 
 
+// 请核
+export function collecTask(queryParameter) {
+  return request({
+    url: '/warehouseBusiness/agreementTask/agreementTaskSubmission',
+    method: 'post',
+    data:queryParameter
+  })
+}
+
 // 修改仓储费
 // 修改仓储费
 export function updateAgreements(fId, fStatus) {
 export function updateAgreements(fId, fStatus) {
   return request({
   return request({

+ 26 - 2
src/views/agreement/agreementTask/index.vue

@@ -262,7 +262,7 @@
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
-      <el-button type="primary">请 核</el-button>
+      <el-button @click="confirmCharge"  type="primary">请 核</el-button>
       <div class="dialogTableTitle flex a-center jlr">
       <div class="dialogTableTitle flex a-center jlr">
         <h2>标题</h2>
         <h2>标题</h2>
         <el-button @click="getList_s()">新增</el-button>
         <el-button @click="getList_s()">新增</el-button>
@@ -383,7 +383,8 @@ import {
   exportAgreement,
   exportAgreement,
   listAgreementitems,
   listAgreementitems,
   queryUserVal,
   queryUserVal,
-  updateAgreements
+  updateAgreements,
+  collecTask
 } from '@/api/agreement/agreement'
 } from '@/api/agreement/agreement'
 import { listCorps } from '@/api/basicdata/corps'
 import { listCorps } from '@/api/basicdata/corps'
 import { listGoods } from '@/api/basicdata/goods'
 import { listGoods } from '@/api/basicdata/goods'
@@ -391,6 +392,7 @@ import { delWarehousebills } from '@/api/warehouseBusiness/warehouseInStock'
 import { listGoodsTransfer } from '@/api/warehouseBusiness/goodsTransfer'
 import { listGoodsTransfer } from '@/api/warehouseBusiness/goodsTransfer'
 import { listFees } from '@/api/basicdata/fees'
 import { listFees } from '@/api/basicdata/fees'
 import { updateAgreement_s } from '@/api/warehouseBusiness/agreement'
 import { updateAgreement_s } from '@/api/warehouseBusiness/agreement'
+import {collectFee} from "@/api/finance/charge";
 // import { listUser, queryUserVal } from '@/api/system/user'
 // import { listUser, queryUserVal } from '@/api/system/user'
 
 
 export default {
 export default {
@@ -536,6 +538,28 @@ export default {
         console.log(response)
         console.log(response)
       })
       })
     },
     },
+    // 请核
+    confirmCharge() {
+      console.log(this.form)
+      this.$refs['form'].validate(valid => {
+        if (valid) {
+          if (this.form.fId != null) {
+            updateAgreement(this.form).then(response => {
+              let formData = new window.FormData();
+              // 附件数据
+              formData.append("agreement",JSON.stringify(this.form))
+              formData.append("agreementitems", JSON.stringify(this.agreementitemsList));
+              collecTask(formData).then(response => {
+                this.msgSuccess('请核成功')
+                this.open = false
+                this.getList()
+                this.agreementitemsList = []
+              })
+            })
+          }
+        }
+      })
+    },
     /* 远程模糊查询商品 */
     /* 远程模糊查询商品 */
     goodsRemoteMethod(name) {
     goodsRemoteMethod(name) {
       if (name == null || name === "") {
       if (name == null || name === "") {

+ 2 - 2
src/views/finance/charge/index.vue

@@ -314,10 +314,10 @@
         </el-table-column>
         </el-table-column>
       </el-table>
       </el-table>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
-        <el-button v-if="approve === true" @click="immediateApproval">审批</el-button>
-        <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle">查看审批流</el-button>
         <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
         <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
         <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
         <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
+        <el-button v-if="approve === true" @click="immediateApproval">审批</el-button>
+        <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle">查看审批流</el-button>
         <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
         <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
         <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
         <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
         <el-button v-if="cancelButton === false" @click="homePage">取 消</el-button>
         <el-button v-if="cancelButton === false" @click="homePage">取 消</el-button>

+ 104 - 53
src/views/index.vue

@@ -83,7 +83,7 @@
         <el-table-column prop="auditItem" :show-overflow-tooltip="true" label="日期">
         <el-table-column prop="auditItem" :show-overflow-tooltip="true" label="日期">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <span v-if="!scope.row.auditItem">无时间</span>
             <span v-if="!scope.row.auditItem">无时间</span>
-            <span v-else>{{ scope.row.auditItem.slice(0,10) }}</span>
+            <span v-else>{{ scope.row.auditItem.slice(0, 10) }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column prop="refno3" :show-overflow-tooltip="true" label="提单号"></el-table-column>
         <el-table-column prop="refno3" :show-overflow-tooltip="true" label="提单号"></el-table-column>
@@ -146,9 +146,10 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { listCorps, information, warehouse ,inquiry} from '../../src/api/index'
+import { listCorps, information, warehouse, inquiry } from '../../src/api/index'
 import AddOrUpdate from '@/views/viewApproval'
 import AddOrUpdate from '@/views/viewApproval'
 import ApprovalComments from '@/views/startApproval'
 import ApprovalComments from '@/views/startApproval'
+
 export default {
 export default {
   name: 'index',
   name: 'index',
   data() {
   data() {
@@ -186,82 +187,82 @@ export default {
   },
   },
   methods: {
   methods: {
     //跳转审批页面
     //跳转审批页面
-    approval(row){
-      switch (row.refno2){
-        case 'SJRK':{
-          this.$router.push({ path: '/business/inStock',query:{data:JSON.stringify(row)}})
+    approval(row) {
+      switch (row.refno2) {
+        case 'SJRK': {
+          this.$router.push({ path: '/business/inStock', query: { data: JSON.stringify(row) } })
           break
           break
         }
         }
-        case 'SJCK':{
-          this.$router.push({ path: '/business/outStock',query:{data:JSON.stringify(row)}})
+        case 'SJCK': {
+          this.$router.push({ path: '/business/outStock', query: { data: JSON.stringify(row) } })
           break
           break
         }
         }
-        case 'HQZY':{
-          this.$router.push({ path: '/business/goodsTransfer',query:{data:JSON.stringify(row)}})
+        case 'HQZY': {
+          this.$router.push({ path: '/business/goodsTransfer', query: { data: JSON.stringify(row) } })
           break
           break
         }
         }
-        case 'CKDB':{
-          this.$router.push({ path: '/business/transfer',query:{data:JSON.stringify(row)}})
+        case 'CKDB': {
+          this.$router.push({ path: '/business/transfer', query: { data: JSON.stringify(row) } })
           break
           break
         }
         }
-        case 'JSCCF':{
-          this.$router.push({ path: '/business/agreement',query:{data:JSON.stringify(row)}})
+        case 'JSCCF': {
+          this.$router.push({ path: '/business/agreement', query: { data: JSON.stringify(row) } })
           break
           break
         }
         }
-        case 'CCF':{
-          this.$router.push({ path: '/agreement/agreementStorage',query:{data:JSON.stringify(row)}})
+        case 'CCF': {
+          this.$router.push({ path: '/agreement/agreementStorage', query: { data: JSON.stringify(row) } })
           break
           break
         }
         }
-        case 'ZYF':{
-          this.$router.push({ path: '/agreement/agreementTask',query:{data:JSON.stringify(row)}})
+        case 'ZYF': {
+          this.$router.push({ path: '/agreement/agreementTask', query: { data: JSON.stringify(row) } })
           break
           break
         }
         }
-        case 'SF':{
-          this.$router.push({ path: '/finance/charge',query:{data:JSON.stringify(row)}})
+        case 'SF': {
+          this.$router.push({ path: '/finance/charge', query: { data: JSON.stringify(row) } })
           break
           break
         }
         }
-        case 'DZ':{
-          this.$router.push({ path: '/finance/contrast',query:{data:JSON.stringify(row)}})
+        case 'DZ': {
+          this.$router.push({ path: '/finance/contrast', query: { data: JSON.stringify(row) } })
           break
           break
         }
         }
-        case 'FF':{
-          this.$router.push({ path: '/finance/payment',query:{data:JSON.stringify(row)}})
+        case 'FF': {
+          this.$router.push({ path: '/finance/payment', query: { data: JSON.stringify(row) } })
           break
           break
         }
         }
-        default:{
+        default: {
           return this.$message.error('未知错误,无状态')
           return this.$message.error('未知错误,无状态')
         }
         }
       }
       }
     },
     },
-    inquiry(){
+    inquiry() {
       let data = {
       let data = {
         actId: ''
         actId: ''
       }
       }
-      inquiry(data).then( res =>{
+      inquiry(data).then(res => {
         console.log(res)
         console.log(res)
         this.tableData = res.data
         this.tableData = res.data
       })
       })
     },
     },
-    getDataList(){
+    getDataList() {
       this.addOrUpdateVisible = false
       this.addOrUpdateVisible = false
     },
     },
-    returnData(){
+    returnData() {
       this.addOrUpdateVisib = false
       this.addOrUpdateVisib = false
     },
     },
-    addOrUpdateHandle(){
+    addOrUpdateHandle() {
       this.addOrUpdateVisible = true
       this.addOrUpdateVisible = true
       let id = '448'
       let id = '448'
       let actId = '110'
       let actId = '110'
       this.$nextTick(() => {
       this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id,actId)
+        this.$refs.addOrUpdate.init(id, actId)
       })
       })
     },
     },
-    addOrUpdateHand(){
+    addOrUpdateHand() {
       this.addOrUpdateVisib = true
       this.addOrUpdateVisib = true
       let id = '448'
       let id = '448'
       let actId = '110'
       let actId = '110'
       this.$nextTick(() => {
       this.$nextTick(() => {
-        this.$refs.ApprovalComments.init(id,actId)
+        this.$refs.ApprovalComments.init(id, actId)
       })
       })
     },
     },
     querytoDo(res) {
     querytoDo(res) {
@@ -275,21 +276,63 @@ export default {
     firstinventory() {
     firstinventory() {
       information(0).then(response => {
       information(0).then(response => {
         this.chart = response.data
         this.chart = response.data
-        for (let index of this.chart.corpsListWhouse) {
-          this.master.push({
-            name: index.fName,
-            value: index.fGrossweightD
-          })
-          this.name.push(index.fName)
-        }
-        for (let index of this.chart.goodslistWhouse) {
-          this.commodity.push(index.fName)
-          this.commoditytwo.push(index.fGrossweightD)
-        }
+        console.log(this.chart.whouseList.length)
+        if (this.chart.whouseList.length !== 0) {
+          for (let index of this.chart.corpsListWhouse) {
+            this.master.push({
+              name: index.fName,
+              value: index.fGrossweightD
+            })
+            this.name.push(index.fName)
+          }
+          for (let index of this.chart.goodslistWhouse) {
+            this.commodity.push(index.fName)
+            this.commoditytwo.push(index.fGrossweightD)
+          }
+          this.drawLine()
+          this.drawLinetwo()
+          this.commoDity()
+        } else {
+          this.chart = {
+            corpsListWhouse: [{
+              balance: 0,
+              fCorpid: 58,
+              fGrossweightD: 0,
+              fName: '展示数据',
+              fTotalgross: 10000,
+              fWarehouseName: '展示数据'
+            }],
+            goodslistWhouse: [{
+              balance: 0,
+              fGoodsid: 13,
+              fGrossweightD: 0,
+              fName: '展示商品',
+              fTotalgross: 10000,
+              fWarehouseName: '展示数据'
+            }],
+            whouseList: [{
+              fGrossweightD: 0,
+              fName: '展示数据',
+              fTotalgross: 10000,
+              fWarehouseid: 36
+            }]
+          }
+          for (let index of this.chart.corpsListWhouse) {
+            this.master.push({
+              name: index.fName,
+              value: index.fGrossweightD
+            })
+            this.name.push(index.fName)
+          }
+          for (let index of this.chart.goodslistWhouse) {
+            this.commodity.push(index.fName)
+            this.commoditytwo.push(index.fGrossweightD)
+          }
 
 
-        this.drawLine()
-        this.drawLinetwo()
-        this.commoDity()
+          this.drawLine()
+          this.drawLinetwo()
+          this.commoDity()
+        }
       })
       })
     },
     },
     query() {
     query() {
@@ -443,7 +486,10 @@ export default {
                 }
                 }
               },
               },
               { value: this.chart.whouseList[0].fGrossweightD, name: '占用库容' },
               { value: this.chart.whouseList[0].fGrossweightD, name: '占用库容' },
-              { value: parseFloat(this.chart.whouseList[0].fTotalgross - this.chart.whouseList[0].fGrossweightD).toFixed(1), name: '空闲库容' }
+              {
+                value: parseFloat(this.chart.whouseList[0].fTotalgross - this.chart.whouseList[0].fGrossweightD).toFixed(1),
+                name: '空闲库容'
+              }
             ],
             ],
             emphasis: {
             emphasis: {
               itemStyle: {
               itemStyle: {
@@ -507,7 +553,7 @@ export default {
       // 绘制图表
       // 绘制图表
       myChart.setOption({
       myChart.setOption({
         title: {
         title: {
-          text:this.chart.whouseList[0].fName + '商品统计',
+          text: this.chart.whouseList[0].fName + '商品统计',
           subtext: '实时数据',
           subtext: '实时数据',
           left: 'center'
           left: 'center'
         },
         },
@@ -560,15 +606,19 @@ export default {
   flex-wrap: wrap;
   flex-wrap: wrap;
   justify-content: space-around;
   justify-content: space-around;
   height: 350px;
   height: 350px;
-  li:hover{
+
+  li:hover {
     background-color: #025184;
     background-color: #025184;
   }
   }
-  li:nth-child(6),li:nth-child(7),li:nth-child(8),li:nth-child(9),li:nth-child(10){
+
+  li:nth-child(6), li:nth-child(7), li:nth-child(8), li:nth-child(9), li:nth-child(10) {
     background-color: #2f4554;
     background-color: #2f4554;
   }
   }
-  li:nth-child(6):hover,li:nth-child(7):hover,li:nth-child(8):hover,li:nth-child(9):hover,li:nth-child(10):hover{
+
+  li:nth-child(6):hover, li:nth-child(7):hover, li:nth-child(8):hover, li:nth-child(9):hover, li:nth-child(10):hover {
     background-color: #2f4454d1;
     background-color: #2f4454d1;
   }
   }
+
   li {
   li {
     width: 18%;
     width: 18%;
     height: 150px;
     height: 150px;
@@ -577,7 +627,8 @@ export default {
     text-align: center;
     text-align: center;
     color: #FFFFFF;
     color: #FFFFFF;
     border-radius: 10px;
     border-radius: 10px;
-    cursor:pointer;
+    cursor: pointer;
+
     div {
     div {
       margin-top: 40px;
       margin-top: 40px;