Parcourir la source

供应商模块修改

asd26269546 il y a 2 ans
Parent
commit
db288ce8a6

+ 19 - 3
src/components/my-modal-form/my-modal-form.vue

@@ -136,6 +136,7 @@
 								v-if="item.type === 'upload-flie'"
 							>
 								<Upload
+									v-if="type != 'form'"
 									ref="upload-flie"
 									:before-upload="
 										(flie) => upload(flie, item)
@@ -143,15 +144,20 @@
 									:format="['jpg', 'jpeg', 'png']"
 									accept=".jpg,.png,.jpeg"
 									action=""
+									style="float:left"
 								>
 									<Tooltip :content="item.text">
 										<Button type="primary">上传图片</Button>
 									</Tooltip>
 								</Upload>
-								<span style="margin-left: 10px">{{
-									formData[item.key]
-								}}</span>
+								<span style="margin-left: 10px"> 
+									<img 
+										:src="formData[item.key]" 
+										@click="imgMddalUrl = formData[item.key]; imgMddalType = true;" 
+										style="height:50px;cursor: pointer;" alt="">
+								</span>
 							</div>
+							
 							<Input
 								v-if="item.type === 'upload' && item.disabled"
 								v-model="formData[item.key]"
@@ -395,6 +401,14 @@
 					</Col>
 				</Form>
 			</div>
+			<Modal
+				v-model="imgMddalType"
+				title="图片查看"
+				>
+				<div>
+					<img :src="imgMddalUrl" alt="" />
+				</div>
+			</Modal>
 		</Modal>
 	</div>
 </template>
@@ -493,6 +507,8 @@ export default {
 	data() {
 		const v = this
 		return {
+			imgMddalType:false,
+			imgMddalUrl:"",
 			selectedList: [],
 			tabName: '0',
 			isFirst: true,

+ 1 - 1
src/locale/lang/zh-CN.js

@@ -9,7 +9,7 @@ export default {
   warehouse_maintenance: '仓库维护',
   subarea_manage: '分区管理',
   material_maintenance: '物料维护',
-  provider_maintenance: '供应商维护',
+  provider_maintenance: '* 供应商维护',
   provider_price_maintenance: '价格维护',
   material_manage: '* 申购管理',
   material_apply: '申购单',

+ 4 - 4
src/router/routers.js

@@ -221,16 +221,16 @@ export default [
         component: () => import('@/view/base-manage/material-maintenance/material-maintenance')
       },
       {
-        path: '/provider_maintenance',
-        name: 'provider_maintenance',
+        path: '/provider_maintenance2',
+        name: 'provider_maintenance2',
         meta: {
           title: '供应商维护'
         },
         component: () => import('@/view/base-manage/provider-maintenance/provider-maintenance')
       },
       {
-        path: '/provider_maintenance2',
-        name: 'provider_maintenance2',
+        path: '/provider_maintenance',
+        name: 'provider_maintenance',
         meta: {
           title: '供应商维护'
         },

+ 54 - 8
src/view/base-manage/provider-maintenance/provider-maintenance2.vue

@@ -1,16 +1,31 @@
 <!-- 供应商维护 -->
 <template>
   <div class="container">
+    <Form  :label-width="60" inline>
+      <FormItem label="关键词">
+        <Input v-model="params.search" placeholder="请输入供应商名称、供应商编码"></Input>
+      </FormItem>
+      <FormItem label="用途">
+        <Input v-model="params.Purpose" placeholder="请输入用途关键词"></Input>
+      </FormItem>
+      <Button type="primary" @click="getStatisticsClassify();changePage(1)">查询</Button>
+      <div style="float:right">
+        <Button type="primary" style="margin-right:10px" @click="eventHandle('account')">收款账号维护</Button>
+        <Button type="primary" style="margin-right:10px" @click="eventHandle('priceHandle')">价格维护</Button>
+        <Button type="primary" @click="eventHandle('add')">添加</Button>
+      </div>
+    </Form>
     <div class="tabs-warp">
       <div 
         @click="params.TechnologyType = i.technologyType;changePage(1);" 
         :class="params.TechnologyType == i.technologyType ? 'active' : ''" 
         v-for="i in statisticsClassifyData" 
         :key="i.technologyType">
-        {{technologyTypeList[i.technologyType]}}(<span>{{i.categoryCount}}</span>)
+        {{(i.technologyType == 99) ? '全部' : technologyTypeList[i.technologyType]}}
+        (<span>{{(i.technologyType == 99) ? total : i.categoryCount}}</span>)
       </div>
     </div>
-    <my-table :calcHeight="110" :data="data" :columns="columns" :table-filter="tableFilter" :table-page="params" @event-handle="eventHandle" @on-change="changePage"></my-table>
+    <my-table :calcHeight="110" :data="data" :columns="columns" :table-page="params" @event-handle="eventHandle" @on-change="changePage"></my-table>
     <my-modal-form
       v-model="show"
       :title="title"
@@ -48,7 +63,7 @@ export default {
     const v = this
     return {
       dun:dun,
-      technologyTypeList:['直喷','热转','打纸','墨水','其他'],
+      technologyTypeList:['直喷','热转','打纸','墨水','其他','全部'],
       statisticsClassifyData:[],
       title: '',
       show: false,
@@ -1014,10 +1029,11 @@ export default {
         pageNum: 1,
         pageSize: 10,
         total: 0,
-        TechnologyType:null,
+        TechnologyType:99,
         Purpose:null,
         search:null,
-      }
+      },
+      total:0,
     }
   },
   methods: {
@@ -1047,7 +1063,7 @@ export default {
     },
     // 检索条件事件处理
     eventHandle (option) {
-      switch (option._evnet) {
+      switch (option) {
         case 'search':
           console.log(option)
           this.params.pageNum = 1
@@ -1111,11 +1127,11 @@ export default {
 				.post('/cloudApi/supplier/list', {...this.params})
 				.then((res) => {
 					this.data = res.data.data
+          
 				})
       axios
 				.post('/cloudApi/supplier/list/count', {...this.params})
 				.then((res) => {
-					
           this.params.total = res.data.data
 				})
         
@@ -1127,9 +1143,39 @@ export default {
       // })
     },
     getStatisticsClassify(){
+      
+      function filter(str) { // 特殊字符转义
+        str += ''; // 隐式转换
+        str = str.replace(/%/g, '%25');
+        str = str.replace(/\+/g, '%2B');
+        str = str.replace(/ /g, '%20');
+        str = str.replace(/\//g, '%2F');
+        str = str.replace(/\?/g, '%3F');
+        str = str.replace(/&/g, '%26');
+        str = str.replace(/\=/g, '%3D');
+        str = str.replace(/#/g, '%23');
+        return str;
+      }
+      
+      function formateObjToParamStr(paramObj) {
+        const sdata = [];
+        for (let attr in paramObj) {
+          sdata.push(`${attr}=${filter(paramObj[attr])}`);
+        }
+        return sdata.join('&');
+      };
       axios
-				.get('/cloudApi/supplier/statisticsClassify', {})
+				.get('/cloudApi/supplier/statisticsClassify?' + formateObjToParamStr(this.params))
 				.then((res) => {
+          res.data.data.unshift({
+            technologyType:99,
+            categoryCount:0
+          })
+          axios
+          .post('/cloudApi/supplier/list/count', {...this.params})
+          .then((res) => {
+            this.total = res.data.data
+          })
 					this.statisticsClassifyData = res.data.data
 				})
       

+ 4 - 3
src/view/base-manage/provider-maintenance/purchaseListDtl.vue

@@ -38,7 +38,7 @@
                     <span>退货次数</span>
                 </li>
                 <li style="width:50%">
-                    {{dtl.warningTypeCount}}</br>
+                    {{dtl.warningTypeCount == -1 ? 0 : dtl.warningTypeCount}}</br>
                     <span>问题记录</span>
                 </li>
             </ul>
@@ -113,8 +113,9 @@
                         title: '采购占比',
                         key: 'purProportion',
                         render:(h,p)=>{
+                            console.log(p.row.purProportion)
                             return h('span',{},
-                                p.row.purProportion * 100 + '%'
+                                p.row.purProportion * 1000 /10 + '%'
                             )
                         }
                     },
@@ -294,7 +295,7 @@
                                 key: element.createdTime
                             })
                             data2Copy[0][element.createdTime] = element.money * 1
-                            data2Copy[1][element.createdTime] = element.purProportion * 100 + '%'
+                            data2Copy[1][element.createdTime] = element.purProportion * 1000 / 10 + '%'
                         }
                         v.columns2 = columns2Copy
                         v.data2 = data2Copy

+ 7 - 0
src/view/index/schedule/contract-form.vue

@@ -185,6 +185,7 @@
           <div class="sub-title border">供应商记录</div>
           <div class="supplier-title">
             <span>{{supplierDetail.name}}</span>
+            
             <img v-if="supplierDetail.certificate  && supplierDetail.businessLicense" src="@/assets/images/dun.png" alt="">
             <img v-if="supplierDetail.warningCount > 0" src="@/assets/images/gaojin.png" alt="">
             <div class="qipao-warp" v-if="supplierDetail.warningTypeCount > 0">
@@ -193,6 +194,12 @@
             </div>
             
           </div>
+          <div  class="row">
+            <div class="col  border">
+              <div class="label">联系电话:</div>
+              <div class="value">{{supplierDetail.telephone}}</div>
+            </div>
+          </div>
           <div class="row">
             <div class="col">
               <div class="label">累计采购:</div>

+ 16 - 9
src/view/material-manege/pay/pay-history2.vue

@@ -2,6 +2,15 @@
 <template>
   <div class="container-wrap">
     <div style="margin-bottom:10px">
+		<Form ref="formInline" inline :label-width="100" style="float:left">
+          <Form-item  label="按供应商查找">
+              <Input type="text" v-model="params.supplierName" placeholder="输入关键字模糊搜索"></Input>
+          </Form-item>
+          <Form-item label="按物料查找">
+              <Input type="text" v-model="params.materialName" placeholder="输入关键字模糊搜索"></Input>
+          </Form-item>
+          <Button type="primary" @click="searchFn()">搜索</Button>
+      </Form>
         <date-select v-model="params" @change="selectTime"></date-select>
     </div>
     <div style="background:#fff;padding:10px;margin-bottom:10px">
@@ -53,15 +62,7 @@
         </div>
     </div>
     <div class="container">
-      <Form ref="formInline" inline :label-width="100">
-          <Form-item  label="按供应商查找">
-              <Input type="text" v-model="params.supplierName" placeholder="输入关键字模糊搜索"></Input>
-          </Form-item>
-          <Form-item label="按物料查找">
-              <Input type="text" v-model="params.materialName" placeholder="输入关键字模糊搜索"></Input>
-          </Form-item>
-          <Button type="primary" @click="changePage(1)">搜索</Button>
-      </Form>
+      
       <!-- 表格 -->
       <div class="table-content">
         <div v-if="data && data.length === 0" style="height: 100%;display: flex;justify-content: center;align-items: center">
@@ -282,6 +283,12 @@ export default {
     }
   },
   methods: {
+	searchFn(){
+		const v = this
+		v.getStatistics()
+		v.changePage(1)
+
+	},
     selectTime(){
       const v = this
       v.params.supplierId = ''

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

@@ -13,7 +13,7 @@
 				<div
 					class="mianliao"
 					:style="
-						params.technologyType == 4 ? 'border:2px solid #0077ff' : ''
+						params.technologyType == 5 ? 'border:2px solid #0077ff' : ''
 					"
 					style="width: 50%"
 					@click="mianliaoTbleLineCk({ name: '面料' }, 5)"
@@ -55,7 +55,7 @@
 				<div
 					class="moshui"
 					style="width: 40%"
-					@click="mianliaoTbleLineCk({ name: '墨水' }, 3)"
+					@click="moshuiCk"
 					:style="
 						params.technologyType == 3 ? 'border:2px solid #0077ff' : ''
 					"
@@ -330,7 +330,7 @@
 		<!-- 分页 -->
 		<div class="table-page">
 			<Page
-				:current="params.pageIndex"
+				:current="params.pageNum"
 				:total="params.total"
 				:show-total="true"
 				:page-size="20"
@@ -522,7 +522,7 @@ export default {
 				},
 			],
 			params: {
-				pageIndex: 1,
+				pageNum: 1,
 				pageSize: 20,
 				total: 0,
 				inventoryResults: '1',
@@ -548,18 +548,20 @@ export default {
 			}
 		},
 		rowClassName2(row, index) {
-			
-			if (index == this.params.technologyType) {
-				return 'table-info-row'
-			}
-			if(index == 3 && this.params.technologyType == 4){
-				return 'table-info-row'
+			if(this.params.technologyType == 4){
+				if(index == 3) return 'table-info-row'
+			}else{
+				if (index == this.params.technologyType && this.params.technologyType != 3) {
+					return 'table-info-row'
+				}
 			}
+			
+			
 		},
 		getAll(){
 			this.params.technologyType = null
 			this.params.purpose = null
-			this.params.pageIndex = 1
+			this.params.pageNum = 1
 			this.technologyTypeName = null
 			this.getList()
 		},
@@ -567,15 +569,22 @@ export default {
 			this.technologyTypeName = row.materialPurpose
 			this.params.purpose = row.materialPurpose
 			this.params.technologyType = null
-			this.params.pageIndex = 1
+			this.params.pageNum = 1
+			this.getList()
+		},
+		moshuiCk(){
+			this.params.purpose = null
+			this.params.technologyType = 3
+			this.params.pageNum = 1
 			this.getList()
 		},
 		mianliaoTbleLineCk(row, index) {
-			
+			this.technologyTypeName = null
 			this.params.purpose = null
-			this.params.technologyType = index
-			if(this.params.technologyType == 3){
+			if(index == 3){
 				this.params.technologyType = 4
+			}else{
+				this.params.technologyType = index
 			}
 			this.getList()
 		},
@@ -587,16 +596,20 @@ export default {
 					if (res.data.code == 200) {
 						for (let i = 0; i < res.data.data.records.length; i++) {
 							const element = res.data.data.records[i]
+							element.yilouSum  = 0
+							element.yilouCount  = 0
+							element.silouSum  = 0
+							element.silouCount  = 0
 							for (let j = 0; j < element.houseInfo.length; j++) {
 								const jelement = element.houseInfo[j]
 								console.log(jelement,123123123)
 								if ((jelement.houseName == '一楼面料仓库')) {
-									element.yilouSum = jelement.sum
-									element.yilouCount = jelement.count
+									element.yilouSum = jelement.sum || 0
+									element.yilouCount = jelement.count|| 0
 								}
 								if ((jelement.houseName == '四楼面料仓')) {
-									element.silouSum = jelement.sum
-									element.silouCount = jelement.count
+									element.silouSum = jelement.sum|| 0
+									element.silouCount = jelement.count|| 0
 								}
 							}
 						}
@@ -804,12 +817,12 @@ export default {
 					break
 			}
 		},
-		changePage(pageIndex) {
-			this.params.pageIndex = pageIndex
+		changePage(pageNum) {
+			this.params.pageNum = pageNum
 			this.getList()
 		},
 		search() {
-			this.params.pageIndex = 1
+			this.params.pageNum = 1
 			// this.params.key = this.key
 			// this.params.materialCategoryCode = this.materialCategoryCode
 			this.getList()