ソースを参照

前端代码合并dev

gjy 2 年 前
コミット
221952d1ea

+ 1 - 1
src/api/V2/warehouse/index.js

@@ -122,4 +122,4 @@ export const API_SET_PAYMONEY = 'warehousingOrder/api/payMoney'
 //审核
 export const API_WORKFLOWHANDLE ='/newWorkflow/api/handle'
 //查看可分配金额
-export const API_GET_EXPENSE='/expenseAllocationInfo/getExpenseAllocationInfo'
+export const API_GET_EXPENSE='/contractManagementInfo/getContractInfo'

+ 2 - 1
src/model/warehouse/index.js

@@ -59,7 +59,8 @@ import {
     API_EDIT_WAREHOUSINGORDER,
     API_SET_PAYMONEY,
     API_WORKFLOWHANDLE,
-    API_GET_EXPENSE
+    API_GET_EXPENSE,
+    API_SET_EXPENSE
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'

+ 65 - 65
src/views/contractManagement/component/routers/route.js

@@ -95,71 +95,71 @@ const contractManagementRouter = {
       hidden: true
     },
     // 收购合同
-    // {
-    //   path: 'acquisitionContract',
-    //   component: () =>
-    //     import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/acquisitionContract'),
-    //   name: 'acquisitionContract',
-    //   meta: {
-    //     title: 'acquisitionContract',
-    //     shortcutEntrance: 'contractManagement',
-    //     module: 'contractManagement.buyContract',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'收购合同'
-    //   }
-    // },
-    // //收购合同查看
-    // {
-    //   path: 'acquisitionContractExamine',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractExamine'),
-    //   name: 'acquisitionContractExamine',
-    //   meta: {
-    //     title: 'acquisitionContractExamine',
-    //     shortcutEntrance: 'contractManagement',
-    //     module: 'contractManagement.buyContract.buyContractInfo.view',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'收购合同查看'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden: true
-    // },
-    // //收购合同编辑
-    // {
-    //   path: 'acquisitionContractEdit',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractEdit'),
-    //   name: 'acquisitionContractEdit',
-    //   meta: {
-    //     title: 'acquisitionContractEdit',
-    //     shortcutEntrance: 'contractManagement',
-    //     module: 'contractManagement.buyContract.buyContractInfo.edit',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'收购合同编辑'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden: true
-    // },
-    // //收购合同添加
-    // {
-    //   path: 'acquisitionContractAdd',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractAdd'),
-    //   name: 'acquisitionContractAdd',
-    //   meta: {
-    //     title: 'acquisitionContractAdd',
-    //     shortcutEntrance: 'contractManagement',
-    //     module: 'contractManagement.buyContract.buyContractInfo.add',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'收购合同添加'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden: true
-    // },
+    {
+      path: 'acquisitionContract',
+      component: () =>
+        import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/acquisitionContract'),
+      name: 'acquisitionContract',
+      meta: {
+        title: 'acquisitionContract',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.buyContract',
+        permissicon: [],
+        keepAlive: true,
+        _title:'收购合同'
+      }
+    },
+    //收购合同查看
+    {
+      path: 'acquisitionContractExamine',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractExamine'),
+      name: 'acquisitionContractExamine',
+      meta: {
+        title: 'acquisitionContractExamine',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.buyContract.buyContractInfo.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'收购合同查看'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
+    //收购合同编辑
+    {
+      path: 'acquisitionContractEdit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractEdit'),
+      name: 'acquisitionContractEdit',
+      meta: {
+        title: 'acquisitionContractEdit',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.buyContract.buyContractInfo.edit',
+        permissicon: [],
+        keepAlive: true,
+        _title:'收购合同编辑'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
+    //收购合同添加
+    {
+      path: 'acquisitionContractAdd',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractAdd'),
+      name: 'acquisitionContractAdd',
+      meta: {
+        title: 'acquisitionContractAdd',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.buyContract.buyContractInfo.add',
+        permissicon: [],
+        keepAlive: true,
+        _title:'收购合同添加'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
 
     // 期货采购合同
     // {

+ 2 - 1
src/views/profitable/cashout.vue

@@ -301,7 +301,8 @@
         getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
           .then(response => {
             for (let i = 0; i < response.length; i++) {
-              arr.push({time:response[i].issuingTime,id:response[i].id,weight:response[i].inWarehouseWeight})
+              response[i].issuingDate=response[i].issuingTime.split(' ')[0]
+              arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight})
             }
             this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
           })

+ 11 - 3
src/views/profitable/cashoutaduit.vue

@@ -164,8 +164,10 @@ import WsUpload from '@/components/WsUpload'
         moneys:'按重量自动分配',
         goods:'全部货品',
         goodsList:[],
+        compId:localStorage.getItem('ws-pf_compId'),
         warecontractList:[],
         textarea:'',
+        size:9,
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
         deptBudgetList:{},
         makeWordData: {},
@@ -228,9 +230,6 @@ import WsUpload from '@/components/WsUpload'
         this.rejectshow=true
       },
       rejectclick(){
-        if(this.deptBudgetList.taskId){
-
-        }
         woekflowhandle({
           taskId: this.deptBudgetList.taskId,
           approved:false,
@@ -378,4 +377,13 @@ import WsUpload from '@/components/WsUpload'
   /deep/.el-form-item {
     width: 50%;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 44 - 14
src/views/profitable/cashoutaduitNQ.vue

@@ -120,36 +120,39 @@
       </div>
       <div>
         <div style='margin-top:10px;text-align:right;width:90%;'>
-          <el-button class="bg-bottom" type="primary" size="small" @click="reject()">驳回
+          <el-button class="bg-bottom" type="primary" size="small" @click="submit(0)">驳回
           </el-button>
-          <el-button class="bg-bottom" type="primary" size="small" @click="submit()">通过
+          <el-button class="bg-bottom" type="primary" size="small" @click="submit(1)">通过
         </el-button>
         </div>
       
     </div>
     </div>
     <el-dialog
-      title="驳回"
+      :title="title"
       :visible.sync="rejectshow"
       width="30%"
       :before-close="handleClose">
-      <span>驳回原因</span>
+      <span>{{title}}原因</span>
       <div><el-input
   type="textarea"
   :rows="2"
-  placeholder="请输入驳回原因"
+  :placeholder="'请输入'+title+'原因'"
   v-model="textarea">
 </el-input>
 </div>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="rejectclick">确 定</el-button>
+        <el-button @click="rejectshow = false">取 消</el-button>
+        <el-button type="primary" @click="title=='驳回'?rejectclick():pass()">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 <script>
     import WsUpload from '@/components/WsUpload'
+    import {
+    woekflowhandle
+  } from '@/model/tasksport/index'
   import {lookexenseinfo,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,editexenseinfo} from '@/model/profitable/index'
   export default {
     components: {
@@ -169,7 +172,10 @@
         moneys:'按重量自动分配',
         goods:'全部货品',
         goodsList:[],
+        title:'驳回',
         srcList:[],
+        textarea:'',
+        size:9,
         warecontractList:[],
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
         deptBudgetList:{},
@@ -212,7 +218,9 @@
       }
     },
     methods: {
-      
+      handleClose(){
+        this.rejectshow=false
+      },
       onChange() {
         this.$refs.upload
           .handleSaveBill()
@@ -239,7 +247,8 @@
         getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
           .then(response => {
             for (let i = 0; i < response.length; i++) {
-              arr.push({time:response[i].issuingTime,id:response[i].id,weight:response[i].inWarehouseWeight})
+              response[i].issuingDate=response[i].issuingTime.split(' ')[0]
+              arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight})
             }
             this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
           })
@@ -327,7 +336,7 @@
       returnsales(){
         this.$router.go(-1)
       },
-       submit(){
+       submit(status){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(!this.feeDetailsDistributions[i].distributionMoney){
               this.$message({
@@ -429,7 +438,8 @@
        
         // this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
         this.deptBudgetList.flag=3
-        this.$confirm('确定提交分配信息', '提示', {
+        if(status==1){
+          this.$confirm('确定提交分配信息', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
@@ -437,9 +447,18 @@
           .then(() => {
         editexenseinfo(this.deptBudgetList).toPromise()
           .then(response => {
-            this.pass()
+            this.title='通过'
+            this.rejectshow=true
           })
           })
+        }else{
+          editexenseinfo(this.deptBudgetList).toPromise()
+          .then(response => {
+            this.title='驳回'
+            this.rejectshow=true
+          })
+        }
+        
       },
       pass(){
          this.$confirm('确认通过请款信息?', '提示', {
@@ -451,7 +470,7 @@
             woekflowhandle({
               taskId: this.deptBudgetList.taskId,
               approved:true,
-              auditMind: '34',
+              auditMind: this.textarea,
               needReapply: true,
             }).toPromise()
             .then((response) => {
@@ -459,6 +478,7 @@
                 message: '通过成功!',
                 type: 'success',
               })
+              this.rejectshow=false
               this.$router.go(-1)
             }).catch((response) => {
               this.$message({
@@ -546,7 +566,8 @@
                 getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
               .then(response1 => {
                 for (let i = 0; i < response1.length; i++) {
-                  arr.push({time:response1[i].issuingTime,id:response1[i].id,weight:response1[i].inWarehouseWeight})
+                  response1[i].issuingDate=response1[i].issuingTime.split(' ')[0]
+                  arr.push({time:response1[i].issuingDate,id:response1[i].id,weight:response1[i].inWarehouseWeight})
                 }
                 this.$set(this.datelist,i,JSON.parse(JSON.stringify(arr)))
                 console.log(this.feeDetailsDistributions,this.datelist)
@@ -687,4 +708,13 @@
   /deep/.el-form-item {
     width: 50%;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 10 - 1
src/views/profitable/cashoutedit.vue

@@ -102,6 +102,7 @@
         goodsourcelist:[],
         signingDate:'',
         datelist:[],
+        size:9,
         modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
         wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
         datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
@@ -365,7 +366,6 @@
           })
           return
         }
-        this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
         this.$confirm('确定提交请款信息', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -562,4 +562,13 @@
 .add,.del{
   width:25px;height:25px;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 20 - 8
src/views/profitable/expenseallot.vue

@@ -48,11 +48,8 @@
           </el-form-item>
           <el-form-item label-width='100px' label="附件">
           <div v-if='srcList.length>0'>
-            <span v-for='item in srcList'><el-image
-              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
-              :src="item"
-               :preview-src-list="srcList"></el-image></span>
-             
+            <ws-upload :editable='false' ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+       />
           </div>
           <div v-else>暂无附件</div>
         </el-form-item>
@@ -113,7 +110,7 @@
           </el-table-column>
           <el-table-column prop="date" label="分配金额(元)">
             <template slot-scope="scope">
-                <el-input placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
+                <el-input placeholder="输入分配金额" class="input_css" v-model="scope.row.distributionMoney"></el-input>
             </template>
           </el-table-column>
           <el-table-column prop="address" label="操作" width="200">
@@ -135,9 +132,12 @@
   </div>
 </template>
 <script>
+  import WsUpload from '@/components/WsUpload'
   import {lookexenseinfo,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,editexenseinfo} from '@/model/profitable/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -152,6 +152,7 @@
         goods:'全部货品',
         goodsList:[],
         srcList:[],
+        compId:localStorage.getItem('ws-pf_compId'),
         warecontractList:[],
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
         deptBudgetList:{},
@@ -161,6 +162,7 @@
         signingDate:'',
         datelist:[],
         disabled:false,
+        size:9,
         modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
         wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
         datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
@@ -208,7 +210,8 @@
         getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
           .then(response => {
             for (let i = 0; i < response.length; i++) {
-              arr.push({time:response[i].issuingTime,id:response[i].id,weight:response[i].inWarehouseWeight})
+              response[i].issuingDate=response[i].issuingTime.split(' ')[0]
+              arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight})
             }
             this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
           })
@@ -585,4 +588,13 @@
   /deep/.el-form-item {
     width: 50%;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 18 - 7
src/views/profitable/expenseallotaduit.vue

@@ -52,11 +52,8 @@
           </el-form-item>
           <el-form-item label-width='100px' label="附件">
           <div>
-            <span v-for='item in srcList'><el-image
-              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
-              :src="item"
-               :preview-src-list="srcList"></el-image></span>
-             
+            <ws-upload :editable='false' ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+       />
           </div>
         </el-form-item>
         </el-form>
@@ -107,7 +104,7 @@
             </el-table-column>
             <el-table-column prop="date" label="分配金额(元)">
               <template slot-scope="scope">
-                  <el-input disabled placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
+                  <el-input disabled placeholder="输入分配金额" class="input_css" v-model="scope.row.distributionMoney"></el-input>
               </template>
             </el-table-column>
           </el-table>
@@ -145,9 +142,12 @@
   </div>
 </template>
 <script>
+    import WsUpload from '@/components/WsUpload'
   import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,lookexenseinfo,editexenseinfo} from '@/model/profitable/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -162,6 +162,7 @@
         goods:'全部货品',
         goodsList:[],
         warecontractList:[],
+        compId:localStorage.getItem('ws-pf_compId'),
         textarea:'',
         datelist:[],
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
@@ -170,6 +171,7 @@
         warehouseList:[],
         rejectshow:false,
         goodsourcelist:[],
+        size:9,
         modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
         wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
         datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
@@ -430,4 +432,13 @@
   /deep/.el-form-item {
     width: 50%;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 12 - 3
src/views/profitable/expensemanagementdetails.vue

@@ -122,7 +122,7 @@
               <el-button  v-if='scope.row.status=="已驳回"' @click="edit(scope.row)" type="primary">编辑</el-button>
               <!-- <el-button v-if='scope.row.status=="已驳回"' @click="expenseedit(scope.row)" type="primary">编辑</el-button> -->
               <el-button v-if='!scope.row.distributionStatus&&scope.row.expensesPurpose==1&&scope.row.costType==3&&!scope.row.approveStatus&&scope.row.status=="已付款"
-              ||!scope.row.distributionStatus&&scope.row.expensesPurpose==3&&!scope.row.approveStatus&&scope.row.status=="已付款"||scope.row.expensesPurpose==2' @click="allot(scope.row)" type="primary">分配</el-button>
+              ||!scope.row.distributionStatus&&scope.row.expensesPurpose==3&&!scope.row.approveStatus&&scope.row.status=="已付款"||scope.row.expensesPurpose==2&&scope.row.status=="已付款"' @click="allot(scope.row)" type="primary">分配</el-button>
               <!-- <el-button v-if='scope.row.approveStatus=="已驳回"' @click="del(0,scope.row)" type="primary">删除</el-button> -->
               <el-button v-if='scope.row.status=="已驳回"' @click="del(0,scope.row)" type="danger">删除</el-button>
               <el-button v-if='scope.row.approveStatus=="待财务审核"||scope.row.approveStatus=="待决策人审核"||scope.row.approveStatus=="待内勤审核"' @click="aduit(scope.row)" type="primary">审核</el-button>
@@ -139,7 +139,7 @@
           </el-table-column>
           <el-table-column prop="address" label="分配相关" width="300">
             <template slot-scope="scope">
-              <el-button v-if='scope.row.expensesType==2&&scope.row.distributionStatus=="待确认"&&!scope.row.approveStatus' @click="allotaduit(scope.row)" type="primary">确认</el-button>
+              <el-button v-if='scope.row.expensesType==2&&scope.row.distributionStatus=="待确认"&&!scope.row.approveStatus&&scope.row.status!="已驳回"' @click="allotaduit(scope.row)" type="primary">确认</el-button>
               <el-button v-if='scope.row.expensesType==2&&scope.row.distributionStatus=="已驳回"&&!scope.row.approveStatus' @click="expenseedit(scope.row)" type="primary">编辑</el-button>
               <el-button v-if='scope.row.expensesType==2&&scope.row.distributionStatus=="已驳回"&&!scope.row.approveStatus' @click="del(1,scope.row)" type="danger">删除</el-button>
             </template>
@@ -189,6 +189,7 @@
         deptBudgetTotal: 0,
         currentPage: 1,
         pageSize: 10,
+        size:9,
         recordList:[],
         compId:localStorage.getItem('ws-pf_compId'),
         dialogVisible1:false,
@@ -339,7 +340,15 @@
         }
       },
       shoukuanqueren(row){
-        this.$router.push({name:'receiptaduit',query:{id:row.id}})
+        if(localStorage.getItem('ws-pf_roleName')=='出纳'){
+          this.$router.push({name:'receiptaduit',query:{id:row.id}})
+        }else{
+          this.$message({
+            message: '暂无此权限!',
+            type: 'warning',
+          })
+        }
+        
       },
       aduit(row){
         if(row.taskId){

+ 21 - 3
src/views/profitable/expensemanagentedit.vue

@@ -61,6 +61,8 @@
                :preview-src-list="dataList"></el-image></span>
              
           </div> -->
+          <ws-upload :editable='false' ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+       />
         </el-form-item>
         </el-form>
         <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' class='expensetitle'>费用分配</div>
@@ -154,9 +156,12 @@
   </div>
 </template>
 <script>
+  import WsUpload from '@/components/WsUpload'
   import {lookexenseinfo,getcontract,getwarehouse,getwarehousingorder,editexenseinfo,deloneallocationinfo} from '@/model/profitable/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -170,6 +175,8 @@
         goodsList:[],
         disabled:false,
         warecontractList:[],
+        size:9,
+        compId:localStorage.getItem('ws-pf_compId'),
         // dateRange: this.disabledDate(),
         feeDetailsDistributions:[{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0,}],
         deptBudgetList:{purpose:"合同费用",type:'粮款'},
@@ -233,7 +240,8 @@ weight: 4000}]],
         getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
           .then(response => {
             for (let i = 0; i < response.length; i++) {
-              arr.push({time:response[i].issuingTime,id:response[i].id,weight:response[i].inWarehouseWeight})
+              response[i].issuingDate=response[i].issuingTime.split(' ')[0]
+              arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight})
             }
             this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
           })
@@ -594,7 +602,8 @@ weight: 4000}]],
                 const data  = await getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
                 this.datelist[i]=[]
                 for (let q = 0; q < data.length; q++) {
-                  arr.push({time:data[i].issuingTime,id:data[i].id,weight:data[i].inWarehouseWeight})
+                  data[i].issuingDate=data[i].issuingTime.split(' ')[0]
+                  arr.push({time:data[i].issuingDate,id:data[i].id,weight:data[i].inWarehouseWeight})
                 }
                 this.$set(this.datelist,i,JSON.parse(JSON.stringify(arr)))
               }
@@ -738,4 +747,13 @@ weight: 4000}]],
 .add,.del{
   width:25px;height:25px;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 10 - 0
src/views/profitable/expensemanagentlook.vue

@@ -147,6 +147,7 @@
         compId:localStorage.getItem('ws-pf_compId'),
         roleName:localStorage.getItem('ws-pf_roleName'),
         payeeinfo:{},
+        size:9,
         valueData: [{
             date: 10
           },
@@ -277,4 +278,13 @@
   /deep/.el-form-item {
     width: 50%;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 23 - 8
src/views/profitable/receipt.vue

@@ -56,10 +56,9 @@
             </el-input>
           </el-form-item>
           <el-form-item label-width='100px' label="附件">
-          <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
-            :on-success="handlefujian" :on-remove="handleRemove" class="photo2" accept="image/jpg,image/jpeg,image/png">
-            <i class="el-icon-plus"></i>
-          </el-upload>
+            <ws-upload ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" 
+       />
         </el-form-item>
         </el-form>
         </div>
@@ -71,9 +70,12 @@
   </div>
 </template>
 <script>
+    import WsUpload from '@/components/WsUpload'
   import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder} from '@/model/profitable/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -87,8 +89,10 @@
         moneys:'按重量自动分配',
         goods:'全部货品',
         amount:0,
+        compId:localStorage.getItem('ws-pf_compId'),
         goodsList:[],
         dataList:[],
+        size:9,
         warecontractList:[],
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
         deptBudgetList:{purpose:'合同费用',type:'粮款'},
@@ -118,6 +122,17 @@
       returnsales(){
         this.$router.go(-1)
       },
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.deptBudgetList.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
       // 获取当前年月日
 			getdate() {
 				var date = new Date()
@@ -242,7 +257,7 @@
             })
             this.deptBudgetList={purpose:"合同费用",type:'粮款'}
             this.paymentScreenshot=[]
-            this.$refs.uploadfiles.clearFiles()
+            this.$refs.upload.clearFiles()
             this.$router.go(-1)
             })
       },
@@ -409,7 +424,7 @@
   line-height:100px;
 }
 /deep/.el-upload-list--picture-card .el-upload-list__item{
-  width: 100px;
-  height:100px;
+  width: 110px;
+  height:140px;
 }
 </style>

+ 22 - 7
src/views/profitable/receiptaduit.vue

@@ -52,10 +52,9 @@
             </el-input>
           </el-form-item>
           <el-form-item label-width='100px' label="附件">
-          <el-upload ref='uploadfiles' :file-list='srcList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
-            :on-success="handlefujian" :on-remove="handleRemove" class="photo2" accept="image/jpg,image/jpeg,image/png">
-            <i class="el-icon-plus"></i>
-          </el-upload>
+            <ws-upload ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" 
+       />
         </el-form-item>
         </el-form>
         <div style='width:90%;margin:10px auto;text-align:right;'><el-button class="bg-bottom" type="primary" size="small" @click="reject()">驳回
@@ -85,10 +84,13 @@
   </div>
 </template>
 <script>
+  import WsUpload from '@/components/WsUpload'
   import {lookexenseinfo,editexenseinfo} from '@/model/profitable/index'
   import {woekflowhandle,} from '@/model/tasksport/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -96,6 +98,8 @@
           name: "玉米",
           count: 2000,
         }],
+        size:9,
+        compId:localStorage.getItem('ws-pf_compId'),
         rejectshow:false,
         deptBudgetList:{},
         makeWordData: {},
@@ -115,6 +119,17 @@
       this.getList()
     },
     methods: {
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.deptBudgetList.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
       handlefujian(file) {
         // console.log(file)
         this.paymentScreenshot.push(file.url)
@@ -307,7 +322,7 @@
   line-height:100px;
 }
 /deep/.el-upload-list--picture-card .el-upload-list__item{
-  width: 100px;
-  height:100px;
+  width: 110px;
+  height:140px;
 }
 </style>

+ 21 - 12
src/views/statisticalReport/autoSettlementList.vue

@@ -219,10 +219,13 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <!-- <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
-          </el-upload>
+          </el-upload> -->
+          <ws-upload ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" 
+       />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -307,9 +310,11 @@
     <!--付款截图 -->
     <WinseaContentModal v-model="paymentImg" title="付款截图信息" @on-cancel="handleClose2">
       <p>查看付款截图</p>
-      <div v-for="item in paymentScreenshot1">
+      <ws-upload :editable='false' ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+       />
+      <!-- <div v-for="item in paymentScreenshot1">
         <img style="width: 100px; height: 100px" :src="item" alt="" />
-      </div>
+      </div> -->
     </WinseaContentModal>
   </div>
   <!-- </div> -->
@@ -357,8 +362,7 @@ export default {
   },
 
   data() {
-    return {
-      checked: true,
+    return { 
       alreadyInvoice: '',
       needReapply: true,
       dialogFormVisible1: false,
@@ -382,10 +386,6 @@ export default {
       currect: true,
       formLabelWidth: '120px',
       formLabelWidth1: '140px',
-      barWidth: 0,
-      barHeight: 0,
-      retioX: 1,
-      ratioY: 1,
       isTaped: false,
       isHover: false,
       settlementWeightchange: false,
@@ -400,14 +400,12 @@ export default {
       year: '',
       options: [],
       id: '',
-      pickerOptions: {},
       value2: '',
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
       searchType: '1',
       manualFlag: '',
-      searchTypeText: '未完成',
       searchKeyWord: '',
       startAddress:'',
       driverPayeeList: {
@@ -484,6 +482,17 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.paymentScreenshot = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
     find(){
       this.getList()
     },

+ 1 - 1
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -1623,7 +1623,7 @@
 			selectstorageType(e) {
 				switch (e) {
 					case '采购出库':
-						this.flag = 0
+						this.flag = 8
 						break
 					case '销售出库':
 						this.flag = 1

+ 33 - 24
src/views/warehousenew/warehousingOrder.vue

@@ -85,13 +85,13 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="contractNo" label="合同编号" width="80"></el-table-column>
-        <el-table-column prop="goodsSource" label="货源" width="80">
+        <el-table-column prop="contractNo" label="合同编号" width="130"></el-table-column>
+        <el-table-column prop="goodsSource" label="货源" width="130">
            <template scope="scope">
              <span style='color:#66b1ff;' @click='lookcustomer(scope.row)'>{{scope.row.goodsSource}}</span>
             </template>
         </el-table-column>
-        <el-table-column prop="deliveryWarehouse" label="发货库" width="80"></el-table-column>
+        <el-table-column prop="deliveryWarehouse" label="发货库" width="130"></el-table-column>
         <!-- <el-table-column prop="customer" label="客户" width="100">
            <template scope="scope">
              <span @click='lookcustomer(scope.row)'>{{scope.row.customer}}</span>
@@ -99,7 +99,7 @@
         </el-table-column> -->
         <el-table-column prop="goodsName" label="货名" width="60">
         </el-table-column>
-        <el-table-column prop="inWarehouseWeight1"  width="140" class="table_td" label="入库重量(吨)">
+        <el-table-column prop="inWarehouseWeight1"  width="120" class="table_td" label="入库重量">
           <template scope="scope">
             <span v-if='scope.row.weightedit==false&&scope.row.warehouseType==2||scope.row.warehouseType==1'>{{scope.row.inWarehouseWeight1}}</span>
             <el-input style='width:80%;' v-if='scope.row.weightedit&&scope.row.warehouseType==2' v-model='scope.row.inWarehouseWeight1'></el-input>
@@ -109,31 +109,31 @@
               src="../../../public/img/edit.png" @click="editWeight(scope.row)" alt="" />
           </template>
         </el-table-column>
-        <el-table-column prop="outWarehouseWeight"  width="110" class="table_td" label="出库重量(吨)"></el-table-column>
+        <el-table-column prop="outWarehouseWeight"  width="80" class="table_td" label="出库重量"></el-table-column>
         <el-table-column prop="profitAndLoss" class="table_td" label="盈亏(吨)"></el-table-column>
-        <el-table-column prop="surplusWeight" width="110" class="table_td" label="剩余重量(吨)"></el-table-column>
-        <el-table-column prop="grainFund"  width="100" class="table_td" label="粮款(元)"></el-table-column>
-        <el-table-column prop="amountEdPayable"  width="100" class="table_td" label="已付(元)">
+        <el-table-column prop="surplusWeight" width="80" class="table_td" label="剩余重量"></el-table-column>
+        <el-table-column prop="grainFund"  width="80" class="table_td" label="粮款(元)"></el-table-column>
+        <el-table-column prop="amountEdPayable"  width="90" class="table_td" label="已付(元)">
           <template scope="scope">
             <span >{{scope.row.amountEdPayable}}</span>
             <img v-if='scope.row.addressUrl' width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
             src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
           </template>
         </el-table-column>
-        <el-table-column prop="amountNotPayable" class="table_td" label="未付(元)"></el-table-column>
+        <el-table-column prop="amountNotPayable" width="80" class="table_td" label="未付(元)"></el-table-column>
         <el-table-column prop="amountMoney" width="80" class="table_td" label="费用(元)">
           <template scope="scope">
             <span @click='costclick(scope.row)'>{{scope.row.amountMoney}}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="avgCost"  width="130" class="table_td" label="平均成本(元/吨)"></el-table-column>
-        <el-table-column prop="requestFunds"  width="130" class="table_td" label="请款">
+        <el-table-column prop="avgCost"  width="90" class="table_td" label="平均成本"></el-table-column>
+        <el-table-column prop="requestFunds"  width="130" class="table_td tablerequestFunds" label="请款">
           <template scope="scope">
             <span v-if="!scope.row.select">{{ scope.row.requestFunds }}</span>
             <el-input v-else v-model='scope.row.requestFunds'></el-input>
           </template>
         </el-table-column>
-         <el-table-column prop="remark"  width="130" class="table_td" label="请款备注">
+         <el-table-column prop="remark"  width="80" class="table_td" label="请款备注">
           <template scope="scope">
             <div v-if="!scope.row.select" @click.stop="lookRemark(scope.row)">
               <span class="text_css">查看</span>
@@ -380,7 +380,8 @@
   paymoney,
   editwarehousingorder,
   getExpense,
-  workflowhandle
+  workflowhandle,
+  setExpense
 } from '@/model/warehouse/index'
   import {getpayeeinfo,getbuypayeeinfo} from '@/model/profitable/index'
   import {
@@ -685,12 +686,13 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             return
           }
           _this.dialogTitle=arr1[i].contractNo
-          getExpense({contractNo:arr1[i].contractNo,costType:5}).toPromise()
+          getExpense({contractNo:arr1[i].contractNo,compId:this.compId}).toPromise()
           .then((response) => {
-            _this.form.accumulatedPrepayment=response.accumulatedPrepayment
-            _this.form.recoveryPrepayments=response.recoveryPrepayments
-            _this.form.distributionEd=response.distributionMoney
-            _this.form.distributionCan=response.accumulatedPrepayment-response.recoveryPrepayments-response.distributionMoney
+            _this.form.contractId=response.id
+            _this.form.accumulatedPrepayment=response.accumulatedMargin
+            _this.form.recoveryPrepayments=response.withdrawalOfMargin
+            _this.form.distributionEd=response.allocatedMargin
+            _this.form.distributionCan=response.accumulatedMargin-response.withdrawalOfMargin-response.allocatedMargin
             _this.form.distributionNot=arr1[i].amountNotPayable
             this.currectdata=currectData
             this.marginshow=true
@@ -751,12 +753,13 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             return
           }
           _this.dialogTitle=arr1[i].contractNo
-          getExpense({contractNo:arr1[i].contractNo,costType:1}).toPromise()
+          getExpense({contractNo:arr1[i].contractNo,compId:this.compId}).toPromise()
           .then((response) => {
+            _this.form.contractId=response.id
             _this.form.accumulatedPrepayment=response.accumulatedPrepayment
-            _this.form.recoveryPrepayments=response.recoveryPrepayments
-            _this.form.distributionEd=response.distributionMoney
-            _this.form.distributionCan=response.accumulatedPrepayment-response.recoveryPrepayments-response.distributionMoney
+            _this.form.recoveryPrepayments=response.accumulatedRecovery
+            _this.form.distributionEd=response.prepaidAssigned
+            _this.form.distributionCan=response.accumulatedPrepayment-response.accumulatedRecovery-response.prepaidAssigned
             _this.form.distributionNot=arr1[i].amountNotPayable
           }).catch(() => {
            this.$message({
@@ -954,7 +957,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
-            paymoney({flag:3,money:this.form.distributionIng,warehousingOrderList:arr2}).toPromise()
+            paymoney({flag:3,money:this.form.distributionIng,warehousingOrderList:arr2,contractId:this.form.contractId}).toPromise()
           .then((response) => {
             this.$message({
               message: '分配成功',
@@ -998,7 +1001,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
-            paymoney({flag:2,money:this.form.distributionIng,warehousingOrderList:arr2}).toPromise()
+            paymoney({flag:2,money:this.form.distributionIng,warehousingOrderList:arr2,contractId:this.form.contractId}).toPromise()
           .then((response) => {
             this.$message({
               message: '分配成功',
@@ -1490,4 +1493,10 @@ multiFilter(array, filters) {
   height:100px;
   line-height:100px;
 }
+/deep/.el-table .cell .el-input {
+    padding:10px;
+}
+// /deep/.el-table .cell{
+//   padding:0;
+// }
 </style>