asd26269546 2 years ago
parent
commit
b758a56b08

+ 16 - 25
src/components/my-modal-form/my-modal-form.vue

@@ -151,6 +151,7 @@
 									</Tooltip>
 								</Upload>
 								<span style="margin-left: 10px"> 
+									{{formData[item.key]}}
 									<img 
 										:src="formData[item.key]" 
 										@click="imgMddalUrl = formData[item.key]; imgMddalType = true;" 
@@ -422,6 +423,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,
@@ -666,32 +668,21 @@ export default {
 	methods: {
 		// 图片上传
 		upload(file, item, type) {
-			const reader = new FileReader()
-			reader.readAsDataURL(file)
-			reader.onload = (event) => {
-				UploadBase64({
-					fileBase64: event.srcElement.result,
-					fileName: file.name,
-					floder: 'order',
-				}).then((res) => {
-					if (res.code === 0) {
-						console.log(this.formData)
-						if (type == 'attr') {
-							if (!this.formData.attr) {
-								this.$set(this.formData, 'attr', [])
-							}
-							this.formData.attr.push({
-								realName: file.name,
-								temName: file.name,
-								path: res.result,
-							})
-						}else{
-							this.$set(this.formData, item.key, res.result)
-						}
+			const formData = new FormData();
+			formData.append("file",file);
+			console.log(formData)
+			this.$post('/api/storage-restructure/commonFile/upload',formData).then(res => {
+				if(res.code == 200){
+					console.log(res)
+					if(item.returnType == 'obj'){
+						this.$set(this.formData, item.key, res.data)
+					}else{
+						this.$set(this.formData, item.key, res.data.filePath)
 					}
-				})
-			}
-			return false
+					
+				}
+				
+			})
 		},
 		// 维护记录新增数据
 		historyAdd(data) {

+ 5 - 5
src/components/my-modal-form/my-modal-material.vue

@@ -220,11 +220,11 @@ export default {
         v.treeInit(res.data)
         this.treeData = res.data
       })
-      GetMaterialCategoryZTree().then(res => {
-        if (res.code === 0) {
-          this.treeData = res.result
-        }
-      })
+      // GetMaterialCategoryZTree().then(res => {
+      //   if (res.code === 0) {
+      //     this.treeData = res.result
+      //   }
+      // })
     },
     getList () {
 

+ 1 - 0
src/components/my-modal-pay/index.vue

@@ -394,6 +394,7 @@ export default {
           this.applyDetailsList.push({
             materialCode: select.code,
             materialName: select.name,
+            materialId:select.id,
             spec: select.spec
           })
         }

+ 1 - 1
src/components/my-table/renderListimgs.vue

@@ -8,7 +8,7 @@
               <img src="@/assets/images/qipao.png" style="" alt="">
               <div class="num">{{row.warningTypeCount}}</div>
             </div>
-            <span>{{row.name}}</span>
+            <span>{{row.supplierName}}</span>
           </div>
     </div>
 </template>

+ 7 - 3
src/libs/http.js

@@ -18,9 +18,13 @@ axios.interceptors.request.use(
         if(userData && userData.access_token){
             token = userData.access_token
         }
-        config.data = JSON.stringify(config.data)
-        config.headers['Content-Type'] = 'application/json;charset=UTF-8'
+        //config.data = JSON.stringify(config.data)
         
+        if(config.url.indexOf('commonFile/upload') === -1){
+            config.headers['Content-Type'] = 'application/json;charset=UTF-8'
+        }else{
+            config.headers['Content-Type'] = 'multipart/form-data'
+        }
         if(config.url.indexOf('oauth/captcha') === -1){
             config.headers['Authorization'] = 'Basic c2FiZXI6c2FiZXJfc2VjcmV0'
             config.headers['Blade-Auth'] = token
@@ -156,7 +160,7 @@ export function get(url, params = {}) {
  * @returns {Promise}
  */
 
-export function post(url, data = {},params,headers) {
+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

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

@@ -283,6 +283,7 @@ export default {
                       for (const key in params.row) {
                         this.formData[key] = params.row[key]
                       }
+                      console.log(this.formData)
                       this.formType = 'edit'
                       this.show = true
                     }
@@ -422,7 +423,7 @@ export default {
       for (let i = 0; i < data.length; i++) {
         const element = data[i]; 
         element.title = element.name
-        element.value = element.code
+        element.value = element.id
         element.label = element.name
         if(element.children && element.children.length > 0) this.treeInit(element.children)
       }

+ 113 - 67
src/view/base-manage/provider-maintenance/provider-maintenance2.vue

@@ -23,12 +23,12 @@
 						filterable
 					>
 						<div slot="empty">无匹配数据</div>
-						<Option :value="999">全部</Option>
+						<Option value="">全部</Option>
 						<Option
 							v-for="(i, index) in selectPurposeList"
-							:value="index"
+							:value="i"
 							:key="index"
-							>{{ i.purpose }}</Option
+							>{{ i }}</Option
 						>
 					</Select>
 				</Form-item>
@@ -36,8 +36,8 @@
         <Select v-model="params.accountDate" style="width:150px" >
             <div slot="empty">无匹配数据</div>
             <Option  value="">全部</Option>
-            <Option v-for="(i,index) in accountDateList" :value="i.accountDate" :key="index">
-              {{ i.accountDate + '天(' }}{{i.count}})
+            <Option v-for="(i,index) in accountDateList" :value="i.value" :key="index">
+              {{ i.label }}
             </Option>
         </Select>
       </FormItem>
@@ -45,8 +45,8 @@
         <Select v-model="params.type" style="width:150px">
             <div slot="empty">无匹配数据</div>
             <Option  value="">全部</Option>
-            <Option v-for="(i,index) in safetyWarnDayList" :value="i.type" :key="index">
-              {{ i.name + '(' }}{{i.count}})
+            <Option v-for="(i,index) in safetyWarnDayList" :value="i.value" :key="index">
+              {{ i.label }}
             </Option>
         </Select>
       </FormItem>
@@ -62,7 +62,7 @@
         @click="params.type = i.value;changePage(1);" 
         :class="params.type == i.value ? 'active' : ''" 
         v-for="i in statisticsClassifyData" 
-        :key="i.value || 99">
+        :key="i.value">
         {{i.label}}
       </div>
     </div>
@@ -319,7 +319,7 @@ export default {
                 {
                   type: 'input',
                   label: '对公户名',
-                  key: 'bankAccoutName',
+                  key: 'accountName',
                   placeholder: '请输入对公户名',
                   span: 12
                 },
@@ -344,21 +344,21 @@ export default {
                 {
                   type: 'input',
                   label: '对私户名',
-                  key: 'priOpenBank',
+                  key: 'privateAccountName',
                   placeholder: '请输入对私户名',
                   span: 12
                 },
                 {
                   type: 'input',
                   label: '开户银行',
-                  key: 'priBankAccout',
+                  key: 'privateOpenBank',
                   placeholder: '请输入开户银行',
                   span: 12
                 },
                 {
                   type: 'input',
                   label: '对私账号',
-                  key: 'priBankAccoutName',
+                  key: 'privateBankAccount',
                   placeholder: '请输入对私账号',
                   span: 12
                 }
@@ -367,12 +367,12 @@ export default {
             {
               title: '维护记录',
               type: 'picList',
-              key: 'facPicList'
+              key: 'supplierKeepList'
             },
             {
               title: '其他资质',
               type: 'quaList',
-              key: 'facquaList'
+              key: 'otherQualifications'
             }
           ]
         }
@@ -559,7 +559,7 @@ export default {
                 {
                   type: 'input',
                   label: '对公户名',
-                  key: 'bankAccoutName',
+                  key: 'accountName',
                   placeholder: '请输入对公户名',
                   span: 12
                 },
@@ -584,21 +584,21 @@ export default {
                 {
                   type: 'input',
                   label: '对私户名',
-                  key: 'priOpenBank',
+                  key: 'privateAccountName',
                   placeholder: '请输入对私户名',
                   span: 12
                 },
                 {
                   type: 'input',
                   label: '开户银行',
-                  key: 'priBankAccout',
+                  key: 'privateOpenBank',
                   placeholder: '请输入开户银行',
                   span: 12
                 },
                 {
                   type: 'input',
                   label: '对私账号',
-                  key: 'priBankAccoutName',
+                  key: 'privateBankAccount',
                   placeholder: '请输入对私账号',
                   span: 12
                 }
@@ -833,7 +833,7 @@ export default {
                   type: 'input',
                   label: '对公户名',
                   disabled: true,
-                  key: 'bankAccoutName',
+                  key: 'accountName',
                   placeholder: '请输入对公户名',
                   span: 12
                 },
@@ -861,7 +861,7 @@ export default {
                   type: 'input',
                   label: '对私户名',
                   disabled: true,
-                  key: 'priOpenBank',
+                  key: 'privateAccountName',
                   placeholder: '请输入对私户名',
                   span: 12
                 },
@@ -869,7 +869,7 @@ export default {
                   type: 'input',
                   label: '开户银行',
                   disabled: true,
-                  key: 'priBankAccout',
+                  key: 'privateOpenBank',
                   placeholder: '请输入开户银行',
                   span: 12
                 },
@@ -877,7 +877,7 @@ export default {
                   type: 'input',
                   label: '对私账号',
                   disabled: true,
-                  key: 'priBankAccoutName',
+                  key: 'privateBankAccount',
                   placeholder: '请输入对私账号',
                   span: 12
                 }
@@ -918,7 +918,7 @@ export default {
         },
         {
           title: '供应商名称',
-          key: 'materialCode',
+          key: 'supplierName',
           minWidth: 300,
           render(h,p){
             return h(renderListimgs,{
@@ -1025,8 +1025,8 @@ export default {
                   on: {
                     click: () => {
                       
-                      axios.get('/cloudApi/supplier/detail?id=' + params.row.id,{}).then(res=>{
-                        this.formData = res.data.data
+                      this.$post('/api/storage-restructure/supplier/details',{id:params.row.id}).then(res=>{
+                        this.formData = res.data
                         
                         this.formType = 'edit'
                         this.title = '修改'
@@ -1139,17 +1139,17 @@ export default {
   methods: {
     getSafetyWarnDayList(){
       const v = this
-      axios.post('/cloudApi/supplier/getSafetyWarnDayList',{}).then(res=>{
+      this.$post('/api/storage-restructure/supplier/getSafetyWarnDay',{}).then(res=>{
         console.log(res)
-        v.safetyWarnDayList = res.data.data
+        v.safetyWarnDayList = res.data
       })
       
     },
     getAccountDateList(){
       const v = this
-      axios.post('/cloudApi/supplier/getAccountDateList',{}).then(res=>{
+      this.$post('/api/storage-restructure/supplier/getAccountDate',{}).then(res=>{
         console.log(res)
-        v.accountDateList = res.data.data
+        v.accountDateList = res.data
       })
       
     },
@@ -1165,18 +1165,36 @@ export default {
     },
     cfm (type, formData) {
       if (type === 'add') {
-        this.$post('/api/storage-restructure/supplier/add',formData).then(res=>{
+        const formDataCopy = {
+          ...formData,
+          supplierBank:{
+            accountName:formData.accountName,
+            openBank:formData.openBank,
+            bankAccount:formData.bankAccount,
+            privateAccountName:formData.privateAccountName,
+            privateOpenBank:formData.privateOpenBank,
+            privateBankAccount:formData.privateBankAccount,
+          },
+          supplierContacts:{
+            linkMen:formData.linkMen,
+            mobile:formData.mobile,
+            telephone:formData.telephone,
+            email:formData.email,
+            fax:formData.fax,
+          },
+          supplierKeepList:[],
+          otherQualifications:[],
+        }
+
+        this.$post('/api/storage-restructure/supplier/add',formDataCopy).then(res=>{
           this.show = false
           this.$Message.info(res.data.msg)
-          this.getList()
+          if(res.code === 200){
+            this.show = false
+            this.$Message.info(res.msg)
+            this.getList()
+          }
         })
-        // FactoryAdd(formData).then(res => {
-        //   if (res.code === 0) {
-        //     this.show = false
-        //     this.$Message.info(res.msg)
-        //     this.getList()
-        //   }
-        // })
       } else if (type === 'edit') {
         
         axios.post('/cloudApi/supplier/edit',formData).then(res=>{
@@ -1216,19 +1234,22 @@ export default {
       this.getList()
     },
     getMaterialCategoryZTree () {
-      GetMaterialCategoryZTree().then(res => {
-        if (res.code === 0) {
-          let list = res.result.map(item => {
-            return {
-              label: item.name,
-              value: item.value
-            }
-          })
-          this.formConfig[2].list = list
-          this.editFormConfig[2].list = list
-          this.showFormConfig[2].list = list
-        }
-      })
+      this
+				.$post(
+					'/api/storage-restructure/materialClassify/tree')
+				.then((res) => {
+          for (let i = 0; i < res.data.length; i++) {
+            const element = res.data[i];
+            element.label = element.name
+            element.value = element.id
+          }
+          
+          console.log(res.data)
+					this.formConfig[2].list = res.data
+          this.editFormConfig[2].list = res.data
+          this.showFormConfig[2].list = res.data
+				})
+     
     },
     getUserPageList () {
       GetUserPageList({
@@ -1264,15 +1285,10 @@ export default {
     getMaterialSelectPurposeList(){
       const v = this
       v.loading = true
-      v.$post('/api/storage-restructure/supplier/getStatistics' + '', {})
+      v.$post('/api/storage-restructure/material/getPurpose', {})
         .then((res) => {
-          for (let i = 0; i < res.data.data.length; i++) {
-            const element = res.data.data[i];
-            if(element == ''){
-              res.data.data.splice(i,1)
-            }
-          }
-          v.selectPurposeList = res.data.data
+          
+          v.selectPurposeList = res.data
           v.loading = false
         })
     },
@@ -1293,25 +1309,55 @@ export default {
 				.$post(
 					'/api/storage-restructure/supplier/getStatistics',this.params)
 				.then((res) => {
-          res.data.map(item => {
-            if(!item.value) item.value = null
-          })
+          
 					this.statisticsClassifyData = res.data
 					
 				})
     },
-
+    //获取物料类型树
+    socketInit(){
+      var ws = new WebSocket("ws://36.134.91.96:10001/api/storage-restructure/webStock/123123"); 
+      //申请一个WebSocket对象,参数是服务端地址,同http协议使用http://开头一样,WebSocket协议的url使用ws://开头,另外安全的WebSocket协议使用wss://开头
+      ws.onopen = function(){
+        //当WebSocket创建成功时,触发onopen事件
+        console.log("open");
+        ws.send("hello"); //将消息发送到服务端
+      }
+      ws.onmessage = function(e){
+        //当客户端收到服务端发来的消息时,触发onmessage事件,参数e.data包含server传递过来的数据
+        console.log(e.data,'1111111111111111111111111111')
+        var msg = JSON.parse(e.data)
+        if(msg.type == 1){
+          
+          msg.data.instructions = 'test'
+          msg.data.type = '2'
+          msg.type = '2'
+          ws.send(JSON.stringify(msg));
+        }
+       
+        
+      }
+      ws.onclose = function(e){
+        //当客户端收到服务端发送的关闭连接请求时,触发onclose事件
+        console.log("close");
+      }
+      ws.onerror = function(e){
+        //如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
+        console.log(error);
+      }
+    },
     
   },
   mounted () {
     this.getList()
     // this.getUserPageList()
-    // this.getMaterialCategoryZTree()
+    this.getMaterialCategoryZTree()
     this.getStatisticsClassify()
     // this.getSupplierSelectList()
-    // this.getMaterialSelectPurposeList()
-    // this.getAccountDateList()
-    // this.getSafetyWarnDayList()
+    this.getMaterialSelectPurposeList()
+    this.getAccountDateList()
+    this.getSafetyWarnDayList()
+    //this.socketInit()
   }
 }
 </script>

+ 4 - 4
src/view/material-manege/contract/contract.vue

@@ -9,16 +9,16 @@
         <Button type="primary" style="width: 90px;" @click="search">查询</Button>
       </div>
       <div class="filter-item" style="">
-        <RadioGroup v-model="params.status" @on-change="stateChange">
-          <Radio :label="0">
+        <RadioGroup v-model="params.flowStatus" @on-change="stateChange">
+          <Radio :label="1">
             审批中
 <!--            <span style="color: #3F92F9">({{ data.equelCount || 0 }})</span>-->
           </Radio>
-          <Radio :label="1">
+          <Radio :label="2">
             进行中
 <!--            <span style="color: #f11111">({{ data.notEquelCount || 0 }})</span>-->
           </Radio>
-          <Radio :label="2">
+          <Radio :label="3">
             已完成
             <!--            <span style="color: #f11111">({{ data.notEquelCount || 0 }})</span>-->
           </Radio>

+ 7 - 7
src/view/material-manege/material-apply-detail/material-apply-detail.vue

@@ -193,7 +193,7 @@ export default {
         },
         {
           title: '物料规格',
-          key: 'spec',
+          key: 'materialSpec',
           minWidth: 150
         },
         {
@@ -203,12 +203,12 @@ export default {
         },
         {
           title: '请购数量',
-          key: 'purchaseQty',
+          key: 'applyQuantity',
           minWidth: 150
         },
         {
           title: '现有库存',
-          key: 'stockQty',
+          key: 'stockQuantity',
           minWidth: 150
         },
         {
@@ -226,17 +226,17 @@ export default {
         },
         {
           title: '采购在途数量',
-          key: 'onWayQuantity',
+          key: 'afloatQuantity',
           minWidth: 150
         },
         {
           title: '安全库存',
-          key: 'safetyQty',
+          key: 'safetyStock',
           minWidth: 150
         },
         {
           title: '近30天消耗量',
-          key: 'overUseQty',
+          key: 'useQuantity',
           minWidth: 150
           // },
           // {
@@ -246,7 +246,7 @@ export default {
         },
         {
           title: '申购说明',
-          key: 'applyAccount',
+          key: 'remark',
           minWidth: 150
         }
       ],

+ 103 - 92
src/view/material-manege/pay/pay2.vue

@@ -186,7 +186,7 @@
 								<div class="col">
 									<div class="label">合同编码:</div>
 									<div class="value">
-										{{ item.purchaseBillNo }}
+										{{ item.contractCode }}
 									</div>
 								</div>
 								<div class="col">
@@ -198,8 +198,8 @@
 								<div class="col">
 									<div class="label">付款期限:</div>
 									
-									<div class="value" :style="item.payTimeLimit.indexOf('超过') == -1 ? 'color:rgb(7, 201, 9)' : 'color:red'">
-										{{ item.payTimeLimit }}
+									<div class="value" >
+										{{ item.termsPayment }}
 										<Poptip placement="bottom">
 											<Icon type="ios-alert-outline" size="20" style="margin:0 10px 0 5px;position: relative;top:-2px;color:#333" />
 											<div class="api" slot="content" style="padding:10px;color:#333">
@@ -219,23 +219,23 @@
 							</div>
 							<div class="row">
 								<div class="col">
-									<div class="label">物料名称:</div>
+									<div class="label">物料名称(无字段):</div>
 									<div class="value">
 										{{ item.materialName }}
 									</div>
 								</div>
 								<div class="col">
-									<div class="label">规格:</div>
+									<div class="label">规格(无字段):</div>
 									<div class="value">{{ item.spec }}</div>
 								</div>
 								<div class="col">
-									<div class="label">采购数量:</div>
+									<div class="label">采购数量(无字段):</div>
 									<div class="value">
 										{{ item.purchaseQty }}
 									</div>
 								</div>
 								<div class="col" style="flex: 1">
-									<div class="label">单价:</div>
+									<div class="label">单价(无字段):</div>
 									<div class="value">{{ item.price }}</div>
 								</div>
 							</div>
@@ -243,13 +243,13 @@
 								<div class="col">
 									<div class="label">合同金额:</div>
 									<div class="value">
-										{{ item.contractAmount }}元
+										{{ item.amountMoney }}元
 									</div>
 								</div>
 								<div class="col">
 									<div class="label">质检金额:</div>
 									<div class="value">
-										{{ item.qtyCheckAmount }}元
+										{{ item.adjustAmount }}元
 									</div>
 								</div>
 								<div class="col">
@@ -261,7 +261,7 @@
 								<div class="col" style="flex: 1">
 									<div class="label">未付金额:</div>
 									<div class="value">
-										<span>{{ item.unPayAmount }}</span
+										<span>{{ item.unpaidAmount }}</span
 										>元
 									</div>
 								</div>
@@ -287,7 +287,7 @@
 											class="text"
 											@click="showForm(1, item)"
 											>入库单</span
-										>
+										> 
 										<Icon
 											v-if="item.hasInStock"
 											type="md-checkmark"
@@ -786,87 +786,92 @@ export default {
 		getList() {
 			const v = this
 			this.$Spin.show();
-			GetPurContractPayBill({
-				pageIndex: 1,
-				pageSize: 1000000,
-				keyWord: this.keyWord,
-				payBillStatus: this.params.payBillStatus,
-				payTime:this.params.payTime
-			}).then((res) => {
-				if (res.code === 0) {
-					v.company = []
-					v.salesVolumeCompanyTotal = {
-						'50up':0,
-						'20-50':0,
-						'10-20':0,
-						'5-10':0,
-						'5down':0,
-					}
-					const handle2 = (contractAmount,qtyCheckAmount) => {
-						return function(a,b){
-							const val1 = a[qtyCheckAmount] == 0 ?  a[contractAmount] : a[qtyCheckAmount];
-							const val2 = b[qtyCheckAmount] == 0 ?  b[contractAmount] : b[qtyCheckAmount];
-							return val2 - val1;
-						}
-					}
-					res.result.payBillItems.sort(handle2('contractAmount','qtyCheckAmount'))
-					this.showListCopy = JSON.parse(JSON.stringify(res.result.payBillItems))
-					this.data = JSON.parse(JSON.stringify(res.result))
-					this.showList = this.showListCopy.slice(0,10)
-					for (let i = 0; i < res.result.payBillItems.length; i++) {
-						const element = res.result.payBillItems[i];
-						const isCompany = false
-						for (let j = 0; j < v.company.length; j++) {
-							const jelement = v.company[j];
-							if(element.supplierId == jelement.supplierId){
-								isCompany = true
-								jelement.total = (element.qtyCheckAmount == 0) ? 
-								(jelement.total*1000 + element.contractAmount*1000)/1000 : 
-								(jelement.total*1000 + element.qtyCheckAmount*1000)/1000
-								jelement.list.push(element)
-							}
-						}
-						//如果不存在就新建一条
-						if(!isCompany){
-							v.company.push({
-								list:[{...element}],
-								total:(element.qtyCheckAmount == 0) ? element.contractAmount : element.qtyCheckAmount,
-								supplierId:element.supplierId,
-								supplierName:element.supplierName
-							})
-						}
-					}
+			this.$post('/api/storage-restructure/contractPay/page',this.params).then(res=>{
+				console.log(res)
+				this.$Spin.hide();
+				v.showList = res.data.records
+			})
+			// GetPurContractPayBill({
+			// 	pageIndex: 1,
+			// 	pageSize: 1000000,
+			// 	keyWord: this.keyWord,
+			// 	payBillStatus: this.params.payBillStatus,
+			// 	payTime:this.params.payTime
+			// }).then((res) => {
+			// 	if (res.code === 0) {
+			// 		v.company = []
+			// 		v.salesVolumeCompanyTotal = {
+			// 			'50up':0,
+			// 			'20-50':0,
+			// 			'10-20':0,
+			// 			'5-10':0,
+			// 			'5down':0,
+			// 		}
+			// 		const handle2 = (contractAmount,qtyCheckAmount) => {
+			// 			return function(a,b){
+			// 				const val1 = a[qtyCheckAmount] == 0 ?  a[contractAmount] : a[qtyCheckAmount];
+			// 				const val2 = b[qtyCheckAmount] == 0 ?  b[contractAmount] : b[qtyCheckAmount];
+			// 				return val2 - val1;
+			// 			}
+			// 		}
+			// 		res.result.payBillItems.sort(handle2('contractAmount','qtyCheckAmount'))
+			// 		this.showListCopy = JSON.parse(JSON.stringify(res.result.payBillItems))
+			// 		this.data = JSON.parse(JSON.stringify(res.result))
+			// 		this.showList = this.showListCopy.slice(0,10)
+			// 		for (let i = 0; i < res.result.payBillItems.length; i++) {
+			// 			const element = res.result.payBillItems[i];
+			// 			const isCompany = false
+			// 			for (let j = 0; j < v.company.length; j++) {
+			// 				const jelement = v.company[j];
+			// 				if(element.supplierId == jelement.supplierId){
+			// 					isCompany = true
+			// 					jelement.total = (element.qtyCheckAmount == 0) ? 
+			// 					(jelement.total*1000 + element.contractAmount*1000)/1000 : 
+			// 					(jelement.total*1000 + element.qtyCheckAmount*1000)/1000
+			// 					jelement.list.push(element)
+			// 				}
+			// 			}
+			// 			//如果不存在就新建一条
+			// 			if(!isCompany){
+			// 				v.company.push({
+			// 					list:[{...element}],
+			// 					total:(element.qtyCheckAmount == 0) ? element.contractAmount : element.qtyCheckAmount,
+			// 					supplierId:element.supplierId,
+			// 					supplierName:element.supplierName
+			// 				})
+			// 			}
+			// 		}
 					
 					
 					
-					for (let i = 0; i < v.company.length; i++) {
-						const element = v.company[i];
-						const totalkeyName = 
-							element.total < 50000 ? '5down' : 
-							element.total >= 50000 && element.total < 100000 ? '5-10' :
-							element.total >= 100000 && element.total < 200000 ? '10-20' :
-							element.total >= 200000 && element.total < 500000 ? '20-50' :
-							element.total >= 500000 ? '50up' : '';
-						element.type = 
-							element.total < 50000 ? '6' : 
-							element.total >= 50000 && element.total < 100000 ? '5' :
-							element.total >= 100000 && element.total < 200000 ? '4' :
-							element.total >= 200000 && element.total < 500000 ? '3' :
-							element.total >= 500000 ? '2' : '';
-						v.salesVolumeCompanyTotal[totalkeyName] ++
+			// 		for (let i = 0; i < v.company.length; i++) {
+			// 			const element = v.company[i];
+			// 			const totalkeyName = 
+			// 				element.total < 50000 ? '5down' : 
+			// 				element.total >= 50000 && element.total < 100000 ? '5-10' :
+			// 				element.total >= 100000 && element.total < 200000 ? '10-20' :
+			// 				element.total >= 200000 && element.total < 500000 ? '20-50' :
+			// 				element.total >= 500000 ? '50up' : '';
+			// 			element.type = 
+			// 				element.total < 50000 ? '6' : 
+			// 				element.total >= 50000 && element.total < 100000 ? '5' :
+			// 				element.total >= 100000 && element.total < 200000 ? '4' :
+			// 				element.total >= 200000 && element.total < 500000 ? '3' :
+			// 				element.total >= 500000 ? '2' : '';
+			// 			v.salesVolumeCompanyTotal[totalkeyName] ++
 
-					}
-					const handle = (property) => {
-						return function(a,b){
-							const val1 = a[property];
-							const val2 = b[property];
-							return val2 - val1;
-						}
-					}
-					v.company.sort(handle('total'));
-					v.searchFn()
-				}
-			})
+			// 		}
+			// 		const handle = (property) => {
+			// 			return function(a,b){
+			// 				const val1 = a[property];
+			// 				const val2 = b[property];
+			// 				return val2 - val1;
+			// 			}
+			// 		}
+			// 		v.company.sort(handle('total'));
+			// 		v.searchFn()
+			// 	}
+			// })
 		},
         /* 获取顶部信息 */
 		getContractPayTotal() {
@@ -1240,13 +1245,19 @@ export default {
 				}
 			})
 		},
-		
+		getDataStatstics(){
+			const v = this
+			this.$post('/api/storage-restructure/contractPay/dateStatistics',this.params).then(res=>{
+				v.dateStatistics = res.data
+			})
+		},
 		
 	},
 	mounted() {
-		//this.getList()
-		this.selectTime(1.5)
-		this.getContractPayTotal()
+		this.getList()
+		this.getDataStatstics()
+		// this.selectTime(1.5)
+		// this.getContractPayTotal()
 		
 	},
 }

+ 13 - 36
src/view/material-manege/purchaseTotal/purchaseTotal.vue

@@ -90,7 +90,7 @@
 				<Button
 					style="margin: 0 10px 5px 0"
 					:type="
-						params.supplierIdListCopy == '' ? 'primary' : 'default'
+						params.supplierId == null ? 'primary' : 'default'
 					"
 					@click="changeCompany(null, 0)"
 					>全部</Button
@@ -100,7 +100,7 @@
 					@click="changeCompany(i.supplierId, index)"
 					v-for="(i, index) in company"
 					:type="
-						params.supplierIdList == i.supplierId
+						params.supplierId == i.supplierId
 							? 'primary'
 							: 'default'
 					"
@@ -109,7 +109,7 @@
 					{{ i.supplierName
 					}}<span
 						:style="
-							params.supplierIdList == i.supplierId
+							params.supplierId == i.supplierId
 								? 'color:#ffc107'
 								: 'color:red'
 						"
@@ -187,7 +187,7 @@ export default {
 				},
 				{
 					title: '合同编码',
-					key: 'purchaseBillNo',
+					key: 'contractCode',
 					minWidth: 150,
 					sortable: true,
 				},
@@ -199,7 +199,7 @@ export default {
 				},
 				{
 					title: '采购数量',
-					key: 'purchaseQty',
+					key: 'quantity',
 					minWidth: 100,
 				},
                 {
@@ -228,8 +228,7 @@ export default {
 				pageNum: 1,
 				pageSize: 10,
 				total: 0,
-                supplierIdList:'',
-                supplierIdListCopy:'',
+                supplierId:null,
                 beginTime:null,
                 endTime:null,
 			},
@@ -241,34 +240,12 @@ export default {
 	},
 	methods: {
         selectTime(){
-            this.params.supplierIdList = ''
-            this.params.supplierIdListCopy = ''
+            this.params.supplierId = null
             this.getList()
             this.getTotal()
         },
         changeCompany(_id){
-            if(_id == this.params.supplierIdList) return
-            if(_id == null){
-                this.params.supplierIdList = ''
-                this.params.supplierIdListCopy = ''
-				if(this.company.length == 0){
-					this.params.pageNum = 1
-					this.listData = []
-					return
-				}
-                for (let i = 0; i < this.company.length; i++) {
-                    const element = this.company[i];
-                    if(i == this.company.length){
-                        this.params.supplierIdList = this.params.supplierIdList + element.supplierId
-                    }else{
-                        this.params.supplierIdList = this.params.supplierIdList + element.supplierId + ','
-                    }
-                    
-                }
-            }else{
-                this.params.supplierIdList = _id
-                this.params.supplierIdListCopy = _id
-            }
+            this.params.supplierId = _id
             this.params.pageNum = 1
             this.getList()
         },
@@ -374,20 +351,20 @@ export default {
 		},
 		getList() {
             this.$Spin.show()
-            axios.post('/cloudApi/stockWater/subscriptionAmountPage',{
+            this.$post('/api/storage-restructure/applyPurchase/amountPage',{
                 ...this.params,
             }).then(res=>{
                 console.log(res)
-                this.listData = res.data.data.records
-                this.params.total = res.data.data.total
+                this.listData = res.data.records
+                this.params.total = res.data.total
                 this.$Spin.hide()
             })
 		},
         getTotal(){
-            axios.post('/cloudApi/stockWater/subscriptionAmountStatistics',{
+            this.$post('/api/storage-restructure/applyPurchase/amountStatistics',{
 				 ...this.params,
             }).then(res=>{
-                this.totalData = res.data.data
+                this.totalData = res.data
                 this.company = this.totalData.statisticsSupplier[0]
                 this.$Spin.hide()
             })

+ 7 - 0
src/view/store-in-manage/store-in-record/store-in-record.vue

@@ -44,6 +44,13 @@ export default {
             return h('a', {
               on: {
                 click () {
+                  // this.$post('/api/storage-restructure/applyPurchase/amountStatistics',{
+                  //   applyBillNo: params.row.applyPurchaseCode,
+                  // }).then(res=>{
+                  //     this.totalData = res.data
+                  //     this.company = this.totalData.statisticsSupplier[0]
+                  //     this.$Spin.hide()
+                  // })
                   GetApplyBill({
                     applyBillNo: params.row.applyPurchaseCode
                   }).then(res => {

+ 2 - 2
src/view/store-manage/store-manage/store-manage-2.vue

@@ -318,7 +318,7 @@
 							</div>
 							<div class="row">
 								<div class="col red">
-									盘点结果:{{ item.checkResult }}
+									盘点结果:{{ item.inventoryResults === 1 ? '正常' : '异常' }}
 								</div>
 								<div
 									class="col red"
@@ -331,7 +331,7 @@
 									库存修正量:{{ item.correctionQuantity }}
 								</div>
 								<div class="col">
-									盘点人:{{ item.OperUserName }}
+									盘点人:{{ item.operusername }}
 								</div>
 								<div class="col">
 									盘点时间:{{ item.checkTime }}

+ 25 - 5
src/view/store-manage/store-report/store-report.vue

@@ -1329,17 +1329,37 @@ export default {
 			} else if (this.tabName === '2') {
 				const v = this
 				v.$Spin.show();
-				axios
-					.post('/cloudApi/stockWater/receiptSequence', {
+				console.log(v.params2.yearMonth)
+				const date = new Date(v.params2.yearMonth)
+
+				function getLastDay(){
+					var y = new Date(v.params2.yearMonth).getFullYear(); //获取年份
+					var m = new Date(v.params2.yearMonth).getMonth() + 1; //获取月份
+					var d = '01'
+					m = m < 10 ? '0' + m : m; //月份补 0
+					return [y,m,d].join("-")
+				}
+
+				function getLastDay2(){
+					var y = new Date(v.params2.yearMonth).getFullYear(); //获取年份
+					var m = new Date(v.params2.yearMonth).getMonth() + 1; //获取月份
+					var d = new Date(y, m, 0).getDate(); //获取当月最后一日
+					m = m < 10 ? '0' + m : m; //月份补 0
+					d = d < 10 ? '0' + d : d; //日数补 0
+				
+					return [y,m,d].join("-")
+				}
+				this.$post('/api/storage-restructure/reportForm/warehousingPage', {
 						pageNum:v.params2.pageIndex,
 						pageSize:v.params2.pageSize,
 						keyword: v.params2.workKey,
-						date:v.params2.yearMonth,
+						beginTime:getLastDay(),
+						endTime: getLastDay2(),
 					})
 					.then((res) => {
 						console.log(res)
-						this.data2 = res.data.data.records
-						this.params2.total = res.data.data.total
+						this.data2 = res.data.records
+						this.params2.total = res.data.total
 						setTimeout(() => {
 							v.$Spin.hide();
 						}, 1000);

+ 7 - 10
src/view/store-manage/technician-reprot/site-inventory.vue

@@ -57,7 +57,7 @@
     <div class="bottom">
       <my-table
         ref="table"
-        :data="data.userStockPageList.list"
+        :data="data"
         :columns="columns"
         :table-page="params"
         :is-show-filter="false"
@@ -356,22 +356,19 @@ export default {
       })
     },
     getList () {
-      GetUserStockList({
+      this.$post('/api/storage-restructure/contractDetails/outPage',{
         ...this.params,
-        userId: this.userId,
-        technologyType: this.technologyType
-      }).then(res => {
-        if (res.code === 0) {
-          this.data = res.result
-          this.params.total = res.result.userStockPageList.totalCount
-        }
+      }).then(res=>{
+        this.data = res.data.records
+        this.params.total = res.data.total
       })
+      
     }
   },
   mounted () {
     this.getUserStockStat()
     this.getTechnologyTypList()
-    this.getList()
+    //this.getList()
   }
 }
 </script>

+ 3 - 3
src/view/store-out-manage/daily-report/daily-report.vue

@@ -271,13 +271,13 @@ export default {
       this.getAllList()
     },
     getAllList() {
-      axios
-        .post('/cloudApi/stockBack/userStatistics', {
+      this
+        .$post('/api/storage-restructure/v3PlanStatistics/userStatistics', {
           beginTime: this.params.beginTime,
           endTime: this.params.endTime
         })
         .then(res => {
-          this.typeList = res.data.data
+          this.typeList = res.data
           this.getList()
         })
     },

+ 26 - 11
src/view/store-out-manage/store-out-record/store-out-record.vue

@@ -307,17 +307,32 @@ export default {
       })
     },
     getList () {
-      GetOutStockPageList({
-        ...this.params,
-        key: this.params.key || this.key
-      }).then(res => {
-        if (res.code === 0) {
-          this.tableFilter[6].text = '出库总数量:' + res.result.totalQty || 0
-          this.tableFilter[7].text = '出库件数:' + res.result.totalCount || 0
-          this.data = res.result.outStockPageList.list
-          this.params.total = res.result.outStockPageList.totalCount
-        }
-      })
+
+      
+
+      this.$post('/api/storage-restructure/contractDetails/outPage',  {...this.params})
+        .then((res) => {
+          
+          this.data = res.data.records
+          this.params.total = res.data.total
+        })
+      this.$post('/api/storage-restructure/contractDetails/outStatistics',  {...this.params})
+        .then((res) => {
+          
+          this.tableFilter[6].text = '出库总数量:' + res.data.sum || 0
+          this.tableFilter[7].text = '出库件数:' + res.data.count || 0
+        })
+      // GetOutStockPageList({
+      //   ...this.params,
+      //   key: this.params.key || this.key
+      // }).then(res => {
+      //   if (res.code === 0) {
+      //     this.tableFilter[6].text = '出库总数量:' + res.result.totalQty || 0
+      //     this.tableFilter[7].text = '出库件数:' + res.result.totalCount || 0
+      //     this.data = res.result.outStockPageList.list
+      //     this.params.total = res.result.outStockPageList.totalCount
+      //   }
+      // })
     }
   },
   mounted () {

+ 9 - 0
vue.config.js

@@ -27,6 +27,8 @@ const BASE_URL = process.env.NODE_ENV === 'production'
   : '/';
 const ip = 'http://36.134.91.96:10001/api'
 //const ip = 'https://cfm.bytesail.cn/api'
+
+const ip2 = 'http://120.79.80.64:8050'
 module.exports = {
   devServer: {
     port: "8081", //代理端口
@@ -35,6 +37,13 @@ module.exports = {
       'Access-Control-Allow-Origin': '*',
     },
     proxy: {
+      '/cloudApi': {
+        target: ip2,
+        ws: true,
+        pathRewrite: {
+          '^/api': '/'
+        }
+      },
       '/api': {
 				//本地服务接口地址
 				target: ip,