瀏覽代碼

浮点bug,版本管理模块

asd26269546 2 年之前
父節點
當前提交
979efacd26

+ 45 - 1
src/components/my-modal-form/my-modal-form.vue

@@ -157,7 +157,23 @@
 										style="height:50px;cursor: pointer;" alt="">
 								</span>
 							</div>
-							
+							<div
+								class="upload-app"
+								v-if="item.type === 'upload-app'"
+							>
+								<Upload
+									v-if="type != 'form'"
+									ref="upload-flie"
+									:before-upload="
+										(flie) => uploadApk(flie, item)
+									"
+									action=""
+									style="float:left"
+								>
+									<Button type="primary">上传apk</Button>
+								</Upload>
+								<p>{{formData[item.key]}}</p>
+							</div>
 							<Input
 								v-if="item.type === 'upload' && item.disabled"
 								v-model="formData[item.key]"
@@ -422,6 +438,7 @@ import MaterialTable from './material-table'
 import Charts from './charts'
 import MyTreeSelect from '_c/my-tree-select/my-tree-select'
 import { UploadBase64 } from '@/api/upload'
+import axios from 'axios'
 export default {
 	components: {
 		MyTable,
@@ -664,7 +681,34 @@ export default {
 		}
 	},
 	methods: {
+		//上传app文件
+		uploadApk(file, item, type){
+			//const reader = new FileReader()
+			const formData = new FormData();
+			formData.append("file",file);
+			console.log(formData)
+			axios.post('/cloudApi/applet/uploadFile',formData,{
+                'Content-type' : 'multipart/form-data'
+            }).then(res => {
+				console.log(res.data.msg)
+				this.$set(this.formData, item.key, res.data.msg)
+			})
+			// reader.readAsDataURL(file)
+			// reader.onload = (event) => {
+			// 	console.log(file)
+			// 	// UploadBase64({
+			// 	// 	fileBase64: event.srcElement.result,
+			// 	// 	fileName: file.name,
+			// 	// 	floder: 'order',
+			// 	// }).then((res) => {
+			// 	// 	if (res.code === 0) {
+			// 	// 		this.$set(this.formData, item.key, res.result)
+			// 	// 	}
+			// 	// })
+			// }
+		},
 		// 图片上传
+		
 		upload(file, item, type) {
 			const reader = new FileReader()
 			reader.readAsDataURL(file)

+ 1 - 0
src/libs/axios.js

@@ -2,6 +2,7 @@ import axios from 'axios'
 import store from '@/store'
 import router from '@/router'
 import { Message, Spin } from 'iview'
+axios.defaults.timeout = '3000000'
 axios.interceptors.request.use(
   function (config) {
       if(config.data && config.data.endTime){

+ 1 - 1
src/router/routers.js

@@ -330,7 +330,7 @@ export default [
         meta: {
           title: "版本控制",
         },
-        component: () => import("@/view/system-manage/vision-manage/index"),
+        component: () => import("@/view/system-manage/vision-manage/vision-page"),
       },
       {
         path: "/store_update_old",

+ 60 - 2
src/view/base-manage/material-maintenance/material-maintenance.vue

@@ -30,6 +30,14 @@
           <setting-form v-model="settingShow"></setting-form>
         </div>
       </div>
+      <Modal
+        v-model="openModalType"
+            title="物料价格"
+            width="800"
+            >
+            <Table :columns="openModalcolumns" :data="openModalData"></Table>
+        </Modal>
+      
     </div>
   </div>
 </template>
@@ -49,7 +57,7 @@ import MyTable from '_c/my-table/my-table'
 import MyTree from '_c/my-tree/my-tree'
 import MyModalForm from '_c/my-modal-form/my-modal-form'
 import SettingForm from './setting-form'
-
+import axios from 'axios'
 export default {
   name: 'material_maintenance',
   components: {
@@ -243,6 +251,14 @@ export default {
           minWidth: 100
         },
         {
+          title: '供应商',
+          key: 'safetyWarnDay',
+          minWidth: 100,
+          render:(h,p) => {
+            return <span style="color:#0268FF;border-bottom:1px solid #0268FF;cursor: pointer;" onClick={()=>{this.openModal(p)}}>查看</span>
+          }
+        },
+        {
           title: '操作',
           key: 'action',
           align: 'center',
@@ -342,10 +358,52 @@ export default {
         total: 0
       },
       data: [],
-      treeData: []
+      treeData: [],
+      openModalData:[],
+      openModalType:false,
+      openModalcolumns:[
+        {
+          type: 'index',
+          width: 60,
+          align: 'center'
+        },
+        {
+          title: '供应商',
+          key: 'name',
+          width: 300,
+          render:(h,p) => {
+            return <span style="color:#0268FF;border-bottom:1px solid #0268FF;cursor: pointer;" onClick={()=>{
+              this.openModalType = false
+              this.$router.push({
+                name: 'purchaseListDtl',
+                query: p.row,
+              })
+            }}>{p.row.name}</span>
+          }
+        },
+        {
+          title: '当前价格',
+          key: 'price'
+        },
+        {
+          title: '历史最高',
+          key: 'maxPrice'
+        },
+        {
+          title: '历史最低',
+          key: 'minPrice'
+        },
+      ],
     }
   },
   methods: {
+    openModal(p){
+      this.openModalData = []
+      axios.post('/cloudApi/material/getMaterialPrice',{materialCode:p.row.code}).then(res=>{
+        this.openModalData = res.data.data
+        this.openModalType = true
+      })
+    },
     getTechnologyTypList () {
       GetTechnologyTypList().then(res => {
         if (res.code === 0) {

+ 101 - 5
src/view/material-manege/pay/pay-detail.vue

@@ -114,10 +114,80 @@
                     <div class="value">{{ item.hadPayAmount }}元</div>
                   </div>
                   <div class="col" style="flex: 1">
-                    <div class="label">本次应付:</div>
-                    <div class="value">
-                      <span style="color: red">{{ item.actAmount  }}</span>元
-                    </div>
+                    <Tooltip
+                      placement="bottom"
+                      @on-popper-show="getData(item)"
+                      max-width="600"
+                    >
+                      <div class="label">
+                        <div class="label">本次应付:</div>
+                        <div class="value">
+                          <span style="color: red">{{ item.actAmount   }}</span>元
+                        </div>
+                      </div>
+                      <div slot="content">
+                        <div v-for="(itemPay, index) in paymentList" :key="index">
+                          <span style="text-align: left; white-space: normal">
+                            物料编码: {{ itemPay.materialcode }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            合同批次: {{ itemPay.batchno }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            退货日期: {{ itemPay.outDate }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            退货数量: {{ itemPay.quantity }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            单价: {{ itemPay.price }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            金额: {{ itemPay.amount }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            原因: {{ itemPay.applyreason }}
+                          </span>
+                        </div>
+                      </div>
+                    </Tooltip>
+                    
                   </div>
                 </div>
                 <div class="row">
@@ -125,7 +195,14 @@
                     <div class="label">付款说明:</div>
                     <div class="value">{{ item.payAccount }}</div>
                   </div>
+                  
                 </div>
+                <!-- <div class="row">
+                  <div class="col">
+                    <div class="label">审批进度:</div>
+                    <div class="value">{{ item.approvalNode }}</div>
+                  </div>
+                </div> -->
               </div>
               <div class="item-right">
                 <div class="forms">
@@ -241,6 +318,7 @@ import ContractForm from './modals/contract-form'
 import ApplyForm from './modals/apply-pass-form'
 import { GetInStockBill } from '@/api/stock'
 import PayForm from '@/view/index/schedule/pay-form'
+import axios from "axios";
 export default {
   name: 'material_pay_detail',
   components: {
@@ -278,10 +356,21 @@ export default {
         pageSize: 10,
         total: 0,
         payApprovalStatus: 0
-      }
+      },
+      paymentList: [],
     }
   },
   methods: {
+    getData(item) {
+      this.paymentList = [];
+      axios
+        .post("/cloudApi/stockWater/contractPaymentList", {
+          balancePurBillNo: item.purchaseBillNo,
+        })
+        .then((res) => {
+          this.paymentList = res.data.data;
+        });
+    },
     showPayApproval (linkId) {
       this.formData = { linkId }
       this.show = true
@@ -408,6 +497,13 @@ export default {
         ...this.params
       }).then(res => {
         if (res.code === 0) {
+          res.result.unPayAmount = res.result.unPayAmount.toFixed(2)
+          res.result.payBillItems.map(item => {
+            item.actAmount = item.actAmount.toFixed(2)
+          })
+          res.result.techAmtItems.map(item => {
+            item.amount = item.amount.toFixed(2)
+          })
           this.data = res.result
           this.params.total = res.result.pageCount
         }

+ 86 - 5
src/view/material-manege/pay/pay-history.vue

@@ -124,10 +124,80 @@
                     <div class="value">{{ item.hadPayAmount * 1 }}元</div>
                   </div>
                   <div class="col" style="flex: 1">
-                    <div class="label">本次应付:</div>
-                    <div class="value">
-                      <span style="color: red">{{ item.actAmount  }}</span>元
-                    </div>
+                    <Tooltip
+                      placement="bottom"
+                      @on-popper-show="getData(item)"
+                      max-width="600"
+                    >
+                      <div class="label">
+                        <div class="label">本次应付:</div>
+                        <div class="value">
+                          <span style="color: red">{{ item.actAmount  }}</span>元
+                        </div>
+                      </div>
+                      <div slot="content">
+                        <div v-for="(itemPay, index) in paymentList" :key="index">
+                          <span style="text-align: left; white-space: normal">
+                            物料编码: {{ itemPay.materialcode }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            合同批次: {{ itemPay.batchno }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            退货日期: {{ itemPay.outDate }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            退货数量: {{ itemPay.quantity }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            单价: {{ itemPay.price }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            金额: {{ itemPay.amount }}
+                          </span>
+                          <span
+                            style="
+                              padding-left: 16px;
+                              text-align: left;
+                              white-space: normal;
+                            "
+                          >
+                            原因: {{ itemPay.applyreason }}
+                          </span>
+                        </div>
+                      </div>
+                    </Tooltip>
+                    
                   </div>
                 </div>
               </div>
@@ -286,10 +356,21 @@ export default {
         supplierName: '',
         strTime: '',
         endTime: '',
-      }
+      },
+      paymentList:[],
     }
   },
   methods: {
+    getData(item) {
+      this.paymentList = [];
+      axios
+        .post("/cloudApi/stockWater/contractPaymentList", {
+          balancePurBillNo: item.purchaseBillNo,
+        })
+        .then((res) => {
+          this.paymentList = res.data.data;
+        });
+    },
     getSupplierSelectList(req){
 			const v = this
 			v.loading = true

+ 77 - 30
src/view/store-manage/inventory-record/inventory-record-new.vue

@@ -3,9 +3,9 @@
   <div class="container-wrap">
     <div style="display: flex;justify-content: space-between;align-items: center;padding: 2px 0">
       <div>
-        <span @click="typeClick(4)" :style="{color: type === 4 ? 'blue' : ''}" style="text-decoration: underline;cursor: pointer">最新人工盘点</span>
+        <!-- <span @click="typeClick(4)" :style="{color: type === 4 ? 'blue' : ''}" style="text-decoration: underline;cursor: pointer">最新人工盘点</span>
         <span style="padding: 0 10px">|</span>
-        <span @click="typeClick(3)" :style="{color: type === 3 ? 'blue' : ''}" style="text-decoration: underline;cursor: pointer">最新自动盘点</span>
+        <span @click="typeClick(3)" :style="{color: type === 3 ? 'blue' : ''}" style="text-decoration: underline;cursor: pointer">最新自动盘点</span> -->
       </div>
       <div>
         <Button @click="more" style="margin-right: 10px">更多记录>></Button>
@@ -18,7 +18,7 @@
     <div class="container">
       <div class="tabs">
         <div
-          @click="tabClick(index, item.value)"
+          @click="tabClick(index, item.text)"
           :class="tabsIndex === index ? 'active' : ''"
           class="tab-item"
           v-for="(item, index) in tabs"
@@ -34,7 +34,7 @@
             全部
           </Button>
         </div>
-        <div class="filter-item" v-for="(item, index) in data.purposeList" :key="index">
+        <div class="filter-item" v-for="(item, index) in purposeList" :key="index">
           <Button
             :type="menuIndex === index ? 'primary' : 'default'"
             style="min-width: 90px;"
@@ -47,21 +47,21 @@
         <RadioGroup v-model="params.checkResult" @on-change="stateChange">
           <Radio label="">
             全部
-            <span style="color: #3F92F9">({{ (data.normalCount + data.errorCount) || 0 }})</span>
+            <span style="color: #3F92F9">({{ (normalCount + errorCount) || 0 }})</span>
           </Radio>
           <Radio :label="1">
             盘点结果一致
-            <span style="color: #3F92F9">({{ data.normalCount || 0 }})</span>
+            <span style="color: #3F92F9">({{ normalCount || 0 }})</span>
           </Radio>
           <Radio :label="0">
             盘点结果不一致
-            <span style="color: #f11111">({{ data.errorCount || 0 }})</span>
+            <span style="color: #f11111">({{ errorCount || 0 }})</span>
           </Radio>
         </RadioGroup>
       </div>
       <!-- 表格 -->
       <div class="table-content">
-        <my-table :data="data.checkRecordDetialList && data.checkRecordDetialList.list" :border="true" :tooltip="false" :columns="columns" :isShowFilter="false" :table-page="params" @on-change="changePage"></my-table>
+        <my-table :data="data" :border="true" :isShowPage="false" :tooltip="false" :columns="columns" :isShowFilter="false" :table-page="params" @on-change="changePage"></my-table>
       </div>
     </div>
     <tag-form v-model="show" :form-data="currentData"></tag-form>
@@ -73,6 +73,7 @@ import { GetCheckRecordDetailList } from '@/api/stock'
 import MyTable from '_c/my-table/my-table'
 import TagForm from '@/view/store-manage/store-manage/tag-form'
 import { GetTechnologyTypList } from '@/api/baseData'
+import axios from 'axios'
 export default {
   name: 'material_pay_detail',
   components: {
@@ -83,6 +84,8 @@ export default {
     return {
       show: false,
       currentData: {},
+      normalCount: 0,
+      errorCount: 0,
       recordId: '',
       type: 4,
       technologyType: '',
@@ -90,9 +93,9 @@ export default {
       tabsIndex: 0,
       menuIndex: '',
       titleData: {},
-      data: {
-        checkRecordDetialList: {}
-      },
+      data: [],
+      dataCopy:[],
+      purposeList:[],
       columns: [
         {
           title: '序号',
@@ -191,7 +194,7 @@ export default {
       ],
       params: {
         pageIndex: 1,
-        pageSize: 10,
+        pageSize: 10000,
         total: 0
       }
     }
@@ -213,45 +216,89 @@ export default {
     },
     /* 用途点击 */
     menuTabClick (index = '', item = '') {
+      console.log(item)
       this.menuIndex = index
-      this.params.pageIndex = 1
+      // this.params.pageIndex = 1
       this.params.purpose = item
-      this.getList()
+      this.searchFn()
     },
     /* 单选框切换 */
     stateChange () {
       this.params.pageIndex = 1
-      this.getList()
+      this.searchFn()
     },
     /* 选项卡切换 */
     tabClick (index, value) {
-      this.data = {
-        allStockCheckPageList: {}
-      }
+      // this.data = {
+      //   allStockCheckPageList: {}
+      // }
       this.tabsIndex = index
       this.params.pageIndex = 1
       this.params.isCountEqual = ''
       this.technologyType = value
-      this.getList()
+      console.log(this.technologyType)
+      this.searchFn()
     },
     changePage (pageIndex) {
       this.params.pageIndex = pageIndex
       this.getList()
     },
-    getList () {
-      /* 盘点记录 */
-      GetCheckRecordDetailList({
-        ...this.params,
-        technologyType: this.technologyType,
-        type: this.type,
-        recordId: this.recordId
-      }).then(res => {
-        if (res.code === 0) {
-          this.data = res.result
-          this.params.total = res.result.checkRecordDetialList.totalCount
+    searchFn(){
+      const v = this
+      v.data = []
+      v.array = []
+      v.normalCount = 0
+      v.errorCount = 0
+      v.dataCopy.map(item => {
+        if(v.params.purpose && v.params.purpose != item.purpose) return
+        if(v.technologyType != '全部' && v.technologyType && v.technologyType != item.categoryName) return
+        if(item.result === '正常'){
+          v.normalCount++
+        }else{
+          v.errorCount++
         }
+        if(v.params.checkResult === 1 && item.result != '正常') return
+        if(v.params.checkResult === 0 && item.result == '正常') return
+        
+        v.data.push(item)
       })
     },
+    getList () {
+      /* 盘点记录 */
+      const v = this
+      axios
+					.post('/cloudApi/stockWater/inventoryDetails', {
+						recordId:this.recordId,
+					})
+					.then((res) => {
+						v.dataCopy = res.data.data
+            v.data = res.data.data
+            v.dataCopy.map(item => {
+              if(item.result === '正常'){
+                v.normalCount++
+              }else{
+                v.errorCount++
+              }
+              if(v.purposeList.indexOf(item.purpose) == -1){
+                v.purposeList.push(item.purpose)
+                
+              }
+            })
+            
+            v.params.total = res.data.length
+					})
+      // GetCheckRecordDetailList({
+      //   ...this.params,
+      //   technologyType: this.technologyType,
+      //   type: this.type,
+      //   recordId: this.recordId
+      // }).then(res => {
+      //   if (res.code === 0) {
+      //     this.data = res.result
+      //     this.params.total = res.result.checkRecordDetialList.totalCount
+      //   }
+      // })
+    },
     getTechnologyTypList () {
       GetTechnologyTypList().then(res => {
         if (res.code === 0) {