فهرست منبع

供应商改为合作者

蒋科 6 ماه پیش
والد
کامیت
4d6f0c1930
5فایلهای تغییر یافته به همراه68 افزوده شده و 59 حذف شده
  1. 4 4
      common/http.js
  2. 3 3
      pages.json
  3. 4 4
      pages/index/index.vue
  4. 50 41
      pages/index/supplier.vue
  5. 7 7
      pages/index/supplierAdd.vue

+ 4 - 4
common/http.js

@@ -33,7 +33,7 @@ export function getInfoData(){
 export function getOpsOrderOverview(stationCode){
 	return request.get("/mini/order/home/opsOrderOverview?stationCode=" + stationCode)
 }
-//首页-换电站供应商
+//首页-换电站合作者
 export function getStationOverview(data){
 	return request.get(`/mini/station/home/stationOverview?stationName=`+data)
 }
@@ -85,15 +85,15 @@ export function getDictType(dictType){
 export function getUserAdress(params){
 	return request.post("/system/user/address",params)
 }
-//新增供应商
+//新增合作者
 export function supplierAdd(params){
 	return request.post("/business/supplier/add",params)
 }
-//修改供应商
+//修改合作者
 export function supplierEdit(params){
 	return request.post("/business/supplier/edit",params)
 }
-//删除供应商
+//删除合作者
 export function supplierDel(data){
 	return request.get(`/mini/supplier/del?id=${data.id}&stationCode=${data.stationCode}`)
 }

+ 3 - 3
pages.json

@@ -43,7 +43,7 @@
 		    "path" : "pages/index/supplier",
 		    "style" :                                                                                    
 		    {
-		        "navigationBarTitleText": "供应商",
+		        "navigationBarTitleText": "合作者",
 		        "enablePullDownRefresh": false
 		    }
 		},
@@ -51,7 +51,7 @@
 		    "path" : "pages/index/supplierAdd",
 		    "style" :                                                                                    
 		    {
-		        "navigationBarTitleText": "新增供应商",
+		        "navigationBarTitleText": "新增合作者",
 		        "enablePullDownRefresh": false
 		    }
 		},
@@ -59,7 +59,7 @@
 		    "path" : "pages/index/supplierDetail",
 		    "style" :                                                                                    
 		    {
-		        "navigationBarTitleText": "供应商详情",
+		        "navigationBarTitleText": "合作者详情",
 		        "enablePullDownRefresh": false
 		    }
 		},

+ 4 - 4
pages/index/index.vue

@@ -47,7 +47,7 @@
 			</view>
 			<view class="page-home-supplier-container">
 				<view class="page-home-supplier-title">
-					换电站供应商
+					合作者
 				</view>
 				<view class="page-home-supplier-search">
 					<view class="keyword"><uni-easyinput @clear="getAllData" clearable v-model="keyword" placeholder="请输入换电站名称"></uni-easyinput></view>
@@ -81,7 +81,7 @@
 				noDeal: 99,
 				//工单信息数据对象
 				dataInfo: {},
-				//站点供应商数据列表
+				//站点合作者数据列表
 				datalist: [],
 				//待处理
 				pending: 0,
@@ -254,7 +254,7 @@
 					})
 				}
 			},
-			//跳转供应商页面
+			//跳转合作者页面
 			gotoSupplier(item) {
 				let token = uni.getStorageSync('token')
 				if(!token) {
@@ -286,7 +286,7 @@
 					}
 				})
 			},
-			//获取首页供应商数量信息
+			//获取首页合作者数量信息
 			getStationSupData() {
 				const _that = this;
 				_that.datalist = [];

+ 50 - 41
pages/index/supplier.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="supplier-container">
-		<uni-swipe-action ref="slide">
+		<!-- <uni-swipe-action ref="slide">
 				<view class="supplier-info" @click="gotoSupplierDetail(item)"  v-for="(item,index) in dataList" :key="item.id">
 					<uni-swipe-action-item :right-options="options"
 						@click="bindClick($event,item)" :show="isOpened" @change="change">
@@ -17,8 +17,22 @@
 					</view>
 					</uni-swipe-action-item>
 				</view>
-		</uni-swipe-action>
-		<u-button type="primary" class="commit-button" @click="jumpPage">增加供应商</u-button>
+		</uni-swipe-action> -->
+		<view class="supplier-info" @click="gotoSupplierDetail(item)"  v-for="(item,index) in dataList" :key="item.id">
+			<view class="supplier-title">
+				<view class="supplier-title-text">
+					{{item.name || '-'}}
+				</view>
+				<view class="supplier-title-contacts">
+					{{item.contactName || '-'}}
+				</view>
+			</view>
+			<view class="supplier-tel">
+				{{item.contactPhone || '-'}}
+			</view>
+			
+		</view>
+		<u-button type="primary" class="commit-button" @click="jumpPage">增加合作者</u-button>
 	</view>
 </template>
 
@@ -68,50 +82,45 @@
 			this.getSupplierListData();
 		},
 		methods: {
-			//跳转供应商
+			//跳转合作者
 			jumpPage(){
 				uni.navigateTo({
 					url:`/pages/index/supplierAdd?stationCode=${this.param.stationCode}&stationName=${this.param.stationName}`
 				})
 			},
-			bindClick(e,item) {
-				if(e.content.text==='删除'){
-					let _that = this
-					uni.showModal({
-						title: `确认删除吗?`,
-						content: '',
-						success: function(res) {
-							if (res.confirm) {
-								_that.$http.supplierDel({id:item.id,stationCode:_that.param.stationCode})
-									.then(res => {
-										if (res.code === 200) {
-											_that.getSupplierListData()
-										}else{
-											_that.$utils.msg(res.msg);
-										}
+			// bindClick(e,item) {
+			// 	if(e.content.text==='删除'){
+			// 		let _that = this
+			// 		uni.showModal({
+			// 			title: `确认删除吗?`,
+			// 			content: '',
+			// 			success: function(res) {
+			// 				if (res.confirm) {
+			// 					_that.$http.supplierDel({id:item.id,stationCode:_that.param.stationCode})
+			// 						.then(res => {
+			// 							if (res.code === 200) {
+			// 								_that.getSupplierListData()
+			// 							}else{
+			// 								_that.$utils.msg(res.msg);
+			// 							}
 										
-									}).catch(err => {
-										console.error(err)
-									})
-							} else if (res.cancel) {
-								return false
-							}
-						}
-					})
-				}else{
-					uni.navigateTo({
-						url:'/pages/index/supplierAdd?item='+encodeURIComponent(JSON.stringify(item))
-					})
-				}
-			},
-			change(e) {
-				// console.log(e, '改变事件')
-			},
-
-			//删除供应商
-			delSupplier() {
-
-			},
+			// 						}).catch(err => {
+			// 							console.error(err)
+			// 						})
+			// 				} else if (res.cancel) {
+			// 					return false
+			// 				}
+			// 			}
+			// 		})
+			// 	}else{
+			// 		uni.navigateTo({
+			// 			url:'/pages/index/supplierAdd?item='+encodeURIComponent(JSON.stringify(item))
+			// 		})
+			// 	}
+			// },
+			// change(e) {
+			// 	// console.log(e, '改变事件')
+			// },
 			//跳转详情页
 			gotoSupplierDetail(item) {
 				uni.navigateTo({

+ 7 - 7
pages/index/supplierAdd.vue

@@ -2,12 +2,12 @@
 	<view class="order-up-container">
 		<view class="order-tips">
 			<span class="order-imp">*</span>
-			供应商信息填写
+			合作者信息填写
 		</view>
 		<scroll-view class="content" scroll-y="true" scroll-top=0 enable-back-to-top>
 			<u-form :model="form" ref="uform" :rules="rules" label-align='left' label-width="170">
-				<u-form-item label="*供货商名称" prop="name">
-					<u-input type="text" placeholder="请输入供货商名称" v-model="form.name" />
+				<u-form-item label="*合作者名称" prop="name">
+					<u-input type="text" placeholder="请输入合作者名称" v-model="form.name" />
 				</u-form-item>
 				<u-form-item label="*联系人" prop="contactName">
 					<u-input type="text" placeholder="请输入联系人" v-model="form.contactName" />
@@ -15,11 +15,11 @@
 				<u-form-item label="*联系方式" prop="contactPhone">
 					<u-input type="text" placeholder="请输入联系方式" v-model="form.contactPhone" />
 				</u-form-item>
-				<u-form-item label="*供货商地址" prop="address">
-					<u-input type="text" placeholder="请输入供货商地址" v-model="form.address" />
+				<u-form-item label="*合作者地址" prop="address">
+					<u-input type="text" placeholder="请输入合作者地址" v-model="form.address" />
 				</u-form-item>
-				<u-form-item label="供应范围" prop="radius" :label-position="'top'">
-					<u-input type="textarea" placeholder="请输入供应范围 不超过200个字" :maxlength="200" v-model="form.radius" />
+				<u-form-item label="合作范围" prop="radius" :label-position="'top'">
+					<u-input type="textarea" placeholder="请输入合作范围 不超过200个字" :maxlength="200" v-model="form.radius" />
 				</u-form-item>
 				<u-form-item label="附件(不超过5张,20M以内)" prop="attachment" :label-position="'top'">
 					<u-upload action="#" multiple :fileList="fileList" @on-choose-complete="onChooseComplete"