lilei 1 year ago
parent
commit
bac96b637e

+ 1 - 1
App.vue

@@ -7,7 +7,7 @@
 			token: '',
 			changeOrg:'',
 			version: '', // 当前版本号
-			buildType: 'uat', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
+			buildType: 'dev', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
 			envTips: '', // 环境文字提示
 			theme: 'default', // 主题,default
 			isIphoneXup: false //是否iphonex以及以上的版本

+ 8 - 0
api/shelf.js

@@ -20,6 +20,14 @@ export const shelfSave = (params) => {
     method: 'post'
   })
 }
+// 货架启用停用
+export const shelfModifState = (params) => {
+  return axios.request({
+    url: `shelf/modifState`,
+    data: params,
+    method: 'post'
+  })
+}
 //  货架  货位产品 列表 不分页
 export const shelfProductList = (params) => {
   return axios.request({

+ 1 - 1
config/index.js

@@ -6,7 +6,7 @@ const getConfig = (theme) => {
 			themePath: 'default',
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			uat_URL: 'https://p.iscm.360arrow.com/qpls-md/', // 预发布地址
-			dev_URL: 'http://192.168.2.103:8503/qpls-md/', // 本地地址
+			dev_URL: 'http://192.168.2.117/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 4 - 1
pages/approveStore/detail.vue

@@ -2,7 +2,10 @@
 	<view class="apply-wrap flex flex_column" v-if="form" >
 		<view class="title flex align_center justify_center">
 			<u-icon :name="form.auditStatus == 'PASS'?'icon_complete':(form.auditStatus == 'WAIT'?'wait':'icon_cancel')" custom-prefix="iscm-icon" size="40"></u-icon>
-			<text style="margin-left: 0.5rem;">{{form.auditStatusDictValue}}</text>
+			<view class="flex align_center">
+				<text style="margin-left: 0.5rem;margin-right: 0.5rem;">{{form.auditStatusDictValue}}</text>
+				<u-tag size='mini' type="info" shape="circle" v-if="form.state=='WRITE_OFF'" text="已注销"></u-tag>
+			</view>
 		</view>
 		<view class="login-form">
 			<u-form :model="form" label-width="180rpx" :error-type="['toast']" ref="uForm">

+ 3 - 2
pages/approveStore/list.vue

@@ -15,8 +15,9 @@
 					>
 						<view class="check-row">
 							<view>{{item.applyTime}}</view>
-							<view>
-								<text>{{item.auditStatusDictValue}}</text>
+							<view style="width: 50%;text-align: right;">
+								<u-tag size='mini' type="info" shape="circle" v-if="item.state=='WRITE_OFF'" text="已注销"></u-tag>
+								<text style="margin-left: 0.5rem;">{{item.auditStatusDictValue}}</text>
 							</view>
 						</view>
 						<view class="check-col">

+ 11 - 3
pages/shelfSetting/shelfList.vue

@@ -21,8 +21,9 @@
 			@scrolltolower="onreachBottom">
 				<view class="nav-right-item" v-for="(item, index) in shelfList" :key="item.id" @click="viewDetail(item)">
 					<view class="item-info">
-						<view class="item-name">
-							<text>{{item.shelfName}}</text>
+						<view class="item-name flex justify_between">
+							<text style="maring-right:10px;">{{item.shelfName}}</text>
+							<u-tag size='mini' type="info" shape="circle" v-if="item.state=='WRITE_OFF'" text="已注销"></u-tag>
 						</view>
 						<view class="item-detail">
 							<view>
@@ -39,7 +40,7 @@
 							</view>
 						</view>
 					</view>
-					<view class="arrow">
+					<view class="arrow" v-if="item.state!='WRITE_OFF'">
 						<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
 					</view>
 				</view>
@@ -174,6 +175,13 @@
 				}
 			},
 			viewDetail(item){
+				if(item.state=='WRITE_OFF'){
+					uni.showToast({
+						icon: 'none',
+						title: "此货架已注销"
+					})
+					return
+				}
 				this.tempData = item
 				// 又关联客户
 				if(item.customerEntity){

+ 31 - 7
pages/shelfSetting/shelfSet.vue

@@ -38,7 +38,7 @@
 				<view class="card-row align_center flex justify_between" v-if="showMore">
 					<view class="label">货架状态:</view>
 					<view class="text flex align_center justify_end" @click="showEnableShelf=true">
-						<text>启用</text>
+						<text v-if="detailData">{{detailData.state == 'ENABLE'?'启用':'停用'}}</text>
 						<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
 					</view>
 				</view>
@@ -129,8 +129,8 @@
 		<u-modal v-model="showEnableShelf" :show-cancel-button="true" title="货架状态" @confirm="enbaleShelf">
 			<view class="slot-content" style="padding: 1rem 1rem 1.5rem;text-align: center;">
 				<u-radio-group v-model="shelfStatus">
-					<u-radio :name="1">启用</u-radio>
-					<u-radio :name="0">停用</u-radio>
+					<u-radio name="ENABLE">启用</u-radio>
+					<u-radio name="DISABLED">停用</u-radio>
 				</u-radio-group>
 			</view>
 		</u-modal>
@@ -150,7 +150,8 @@
 		modifFinishFlag,
 		getProductPlace,
 		getShelfPriceShow,
-		updateShelfPriceShow
+		updateShelfPriceShow,
+		shelfModifState
 	} from '@/api/shelf'
 	import {
 		shelfCartNotEmpty
@@ -191,7 +192,7 @@
 				showPriceBak: [],
 				showMore: false,
 				showEnableShelf: false,
-				shelfStatus: 1,
+				shelfStatus: undefined,
 				showCancelShelf: false
 			}
 		},
@@ -315,11 +316,33 @@
 			},
 			// 注销货架
 			cancelShelf(){
-				 this.showCancelShelf = false
+				 const params = {
+				   shelfSn: this.shelfSn,
+				   state: 'WRITE_OFF'
+				 }
+				 shelfModifState(params).then(res => {
+					 if(res.status == 200){
+						 this.toashMsg(res.message)
+						 this.showCancelShelf = false
+						 if(res.status == 200){
+							 uni.navigateBack()
+						 }
+					 }
+				 })
 			},
 			// 启用禁用货架
 			enbaleShelf(){
-				 this.showEnableShelf = false
+				 const params = {
+				   shelfSn: this.shelfSn,
+				   state: this.shelfStatus
+				 }
+				 shelfModifState(params).then(res => {
+					 this.toashMsg(res.message)
+					 this.showEnableShelf = false
+					 if(res.status == 200){
+						 this.getShelfDetal()
+					 }
+				 })
 			},
 			// 设置完成是否
 			switchChange(v) {
@@ -524,6 +547,7 @@
 					if (res.status == 200) {
 						this.detailData = res.data
 						this.switchVal = res.data.finishFlag == 1
+						this.shelfStatus = res.data.state
 						// 价格设置
 						this.getShelfPriceShow()
 					} else {