Browse Source

2023-2-22备份

asd26269546 2 years ago
parent
commit
52b3dd22d9

+ 2 - 2
src/components/main/main.vue

@@ -177,7 +177,7 @@ export default {
     getMenu(){
       this.$get('/api/blade-system/menu/routes').then((res) => {
         res.data.map(item=>{
-          if(item.id === '1585525818292314114') this.menuList = item.children
+          if(item.id === '1622478572398968834') this.menuList = item.children
         })
       })
     },
@@ -199,7 +199,7 @@ export default {
       if (name.indexOf('isTurnByHref_') > -1) {
         window.open(name.split('_')[1])
         return
-      }
+      } 
       this.$router.push({
         name,
         params,

+ 10 - 2
src/libs/http.js

@@ -165,9 +165,17 @@ export function get(url, params = {}) {
 export function post(url, data,params,headers) {
     return new Promise((resolve, reject) => {
         if(process.env.NODE_ENV == "development"){
-            var postUrl = "http://" + window.location.host + url
+            if(url.substr(0,4) === '/api') {
+                var postUrl = "http://" + window.location.host + url
+            }else{
+                var postUrl = "http://" + window.location.host + '/api/storage-restructure' + url
+            }
         }else{
-            var postUrl = "http://" + window.location.host + url
+            if(url.substr(0,4) === '/api') {
+                var postUrl = "http://" + window.location.host + url
+            }else{
+                var postUrl = "http://" + window.location.host + '/api/storage-restructure' + url
+            }
         }
         axios.post(postUrl, data ,{
             params:params,

+ 0 - 3
src/view/base-manage/provider-maintenance/provider-maintenance2.vue

@@ -1157,9 +1157,7 @@ export default {
         console.log(res)
         v.accountDateList = res.data
       })
-      
     },
-  
     selectPurposeFn(e){
       console.log(e)
       if(e == 999){
@@ -1167,7 +1165,6 @@ export default {
       }else{
         this.params.Purpose = this.selectPurposeList[e].purpose
       }
-      
     },
     cfm (type, formData) {
       const formDataCopy = {

+ 3 - 1
src/view/material-manege/contract/contract.vue

@@ -374,6 +374,7 @@ export default {
                   _this.formData = { ...params.row }
                   console.log(params.row.status)
                   if (params.row.status === 2 || params.row.status === 3) {
+                    
                     _this.tabShow = true
                   } else {
                     _this.show = true
@@ -576,7 +577,8 @@ export default {
         pageIndex: 1,
         pageSize: 20,
         total: 0,
-        status: 0
+        status: 0,
+        flowStatus:1,
       }
     }
   },

+ 23 - 7
src/view/material-manege/contract/modal.vue

@@ -39,8 +39,8 @@
             <td>{{ data.materialSpec }}</td>
             <td>{{ data.materialUnit }}</td>
             <td>{{ data.buyQuantity }}</td>
-            <td>{{ data.materialPrice }}</td>
-            <td>{{ data.buyQuantity * data.materialPrice }}</td>
+            <td>{{ data.price }}</td>
+            <td>{{ data.buyQuantity * data.price || 0 }}</td>
             <td>{{ data.remark }}</td>
           </tr>
         </table>
@@ -112,10 +112,11 @@
           style="align-items: flex-start;justify-content: flex-start"
         >
           <div class="label">备注:</div>
+          <!-- :readonly="data.contractApproveState === '待确认' ? false : true" -->
           <div class="value" style="flex: 1">
             <Input
               v-model="remark"
-              :readonly="data.contractApproveState === '待确认' ? false : true"
+              
               type="textarea"
             />
           </div>
@@ -312,11 +313,26 @@ export default {
       this.modal = false
     },
     cfm () {
-      if (!this.gys.factoryId) {
+      if (!this.gys.id) {
         return this.$Message.error('请选择供应商!')
       }
+      this.$post('/api/storage-restructure/contract/flowCreate',{
+        id: this.data.contractId,
+        supplierId:this.gys.id,
+        accountDate:this.gys.accountDate,
+        signTime:this.data.signTime,
+        deliverTime:this.data.deliverTime,
+        price:this.gys.price,
+        quantity:this.data.buyQuantity,
+        remark: this.remark
+      }).then(res=>{
+        this.$Message.info(res.msg || '提交成功!')
+        this.cancel()
+        this.$emit('getlist')
+      })
+      return
       PurcherUpdate({
-        id: this.data.id,
+        
         deliverTime: this.data.deliverTime,
         accountPeriod: this.data.accountPeriod,
         taxValue: 0.13,
@@ -343,7 +359,7 @@ export default {
       switch (option._evnet) {
         case 'search':
           this.params.pageIndex = 1
-          this.params.key = option.key
+          this.params.keyword = option.keyword
           this.getList()
           break
         case 'add':
@@ -356,7 +372,7 @@ export default {
       console.log('select-------------------')
       console.log(this.gys)
       this.data.price = this.gys.price
-      this.data.supplierName = this.gys.facName
+      this.data.supplierName = this.gys.supplierName
       this.data.accountPeriod = this.gys.accountDate
     },
     /* 供应商弹窗取消 */

+ 23 - 21
src/view/material-manege/contract/tab-modal.vue

@@ -11,7 +11,7 @@
           <div class="row" style="padding-bottom: 5px;display: flex;justify-content: space-between;align-items: center;">
             <div class="col" style="display: flex;align-items: center;flex: 1;">
               <div class="label">合同编号:</div>
-              <div class="value">{{ data.purchaseBillNo }}</div>
+              <div class="value">{{ data.contractCode }}</div>
             </div>
             <div class="col"  style="display: flex;align-items: center;flex: 1;">
               <div class="label">交货日期:</div>
@@ -39,11 +39,11 @@
               <tr>
                 <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.materialCode }}</td>
                 <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.materialName }}</td>
-                <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.spec }}</td>
-                <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.unitName }}</td>
-                <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.purchaseQty }}</td>
-                <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.price }}</td>
-                <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.totalAmount }}</td>
+                <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.materialSpec }}</td>
+                <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.materialUnit }}</td>
+                <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.buyQuantity }}</td>
+                <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.materialPrice }}</td>
+                <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.amountMoney }}</td>
                 <!--                  <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.remark }}</td>-->
               </tr>
             </table>
@@ -66,7 +66,7 @@
             <p>6、违约责任及其他事项:合同经确认后,如发生违约,由违约方承担一切责任。履约地在福州。</p>
             <p>7、禁止卖方向买方人员进行直接或间接的利益输送,包括但不限于任何形式的回扣、馈赠、礼物、宴请等,卖方应遵守相应的廉洁条款,若违反本约定的一经发现,买方有权单方面取消与卖方的合作,并有权追究因此引起的买方的一切损失和法律后果。</p>
             <p>8、价格条件:含税,含运费价格</p>
-            <p>9、付款条款:{{ data.accountPeriod }}天账期,供方提供{{ data.taxValue * 100 }}%增值税{{ data.invoiceType === 0 ? '专用': '普通' }}发票</p>
+            <p>9、付款条款:{{ data.accountPeriod }}天账期,供方提供13%增值税{{ data.invoiceType === 0 ? '专用': '普通' }}发票</p>
           </div>
           <div class="row" style="padding-bottom: 10px;display: flex;justify-content: space-between;align-items: center;">
             <div class="col" style="display: flex;align-items: center;flex: 1;">
@@ -142,13 +142,14 @@
                     <!--                  <th style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">备注</th>-->
                   </tr>
                   <tr>
+                    
                     <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.materialCode }}</td>
                     <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.materialName }}</td>
-                    <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.spec }}</td>
-                    <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.unitName }}</td>
-                    <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.purchaseQty }}</td>
-                    <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.price }}</td>
-                    <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.totalAmount }}</td>
+                    <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.materialSpec }}</td>
+                    <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.materialUnit }}</td>
+                    <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.buyQuantity }}</td>
+                    <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.materialPrice }}</td>
+                    <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.amountMoney }}</td>
                     <!--                  <td style="background-color: #eeeeee;padding: 5px;text-align: center;border:solid #dcdee2 1px;position: relative;font-size: 12px;">{{ data.remark }}</td>-->
                   </tr>
                 </table>
@@ -1044,6 +1045,7 @@ export default {
         this.getQuantityCheckRecordList()
         this.getPurExpressFee()
         this.getSupplierQRCodeTest()
+        console.log(this.data)
       } else {
         this.tabName = '1'
         this.rkParams.pageIndex = 1
@@ -1059,6 +1061,7 @@ export default {
   methods: {
     export (type) {
       if (type === 'rk') {
+        
         GetInStockPageList({
           ...this.rkParams,
           key: this.data.purchaseBillNo,
@@ -1277,15 +1280,14 @@ export default {
     },
     // 入库记录
     getInStockPageList () {
-      GetInStockPageList({
-        ...this.rkParams,
-        key: this.data.purchaseBillNo
-      }).then(res => {
-        if (res.code === 0) {
-          this.rkData = res.result.list
-          this.rkParams.total = res.result.totalCount
-        }
-      })
+      this
+        .$post('/contract/page', {...this.rkParams,materialId:this.data.materialId}).then(res => {
+          if (res.code === 200) {
+            this.rkData = res.data.records
+            this.rkParams.total = res.data.total
+          }
+        })
+      
     },
     // 代付运费记录
     getPurExpressFee () {