Explorar o código

修改app 无法添加质检

wangchao %!s(int64=3) %!d(string=hai) anos
pai
achega
c5d00dc67f
Modificáronse 2 ficheiros con 37 adicións e 11 borrados
  1. 25 1
      pages/erpbusiness/add_quality_testing.vue
  2. 12 10
      pages/erpbusiness/index.vue

+ 25 - 1
pages/erpbusiness/add_quality_testing.vue

@@ -156,8 +156,12 @@
 		</view>
 
 		<view class="footer">
+			<!-- <view @click='confirmInfo' class="button">确认初检信息</view> -->
 			<view @click='submit' class="button">提交</view>
 		</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -175,6 +179,8 @@
 		},
 		data() {
 			return {
+				isShowAlert: false,
+				content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
 				inputShow: false,
 				modalName: '',
 				mycarStyle: '',
@@ -348,6 +354,24 @@
 			})
 		},
 		methods: {
+			confirmInfo(){
+				this.isShowAlert = true
+			},
+			alertBtn() {
+				// this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
+				// 	warehouseId: this.cangid,
+				// 	goodsName: this.gridList.goodsName
+				// }).then(res => {
+				// 	if(res.data.code=="200"){
+				// 		this.$api.msg('提交成功!')
+				// 	}else{
+				// 		this.$api.msg('提交失败')
+				// 	}
+				// })
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			waterContentChange() {
 				var that = this
 				if (this.gridList.goodsName && this.cangid) {
@@ -505,7 +529,7 @@
 					success: function(res) {
 						if (res.confirm) {
 							that.$api.doRequest('get', '/paymentManagement/cumulant', {
-									compId: JSON.parse(localStorage.getItem('pcUserInfo')).data.compId,
+									compId: uni.getStorageSync('pcUserInfo').compId,
 									customerNumberCard: that.gridList.customerNumberCard,
 									goodsName: that.gridList.goodsName,
 								})

+ 12 - 10
pages/erpbusiness/index.vue

@@ -16,7 +16,8 @@
 			<!-- 获取当前用户负责的仓库,如果无仓库隐藏收购信息 -->
 			<view class="content2" v-if="isShowAcquisitionInfo&&sgId">
 				<view>收购信息</view>
-				<view @click="navTo('/pages/erpbusiness/acquisitionInformation?status='+status+'&id='+sgId)">{{status}}></view>
+				<view @click="navTo('/pages/erpbusiness/acquisitionInformation?status='+status+'&id='+sgId)">{{status}}>
+				</view>
 			</view>
 		</view>
 		<!-- <view class="wrap">
@@ -54,7 +55,7 @@
 		},
 		data() {
 			return {
-				status:'',
+				status: '',
 				isShowAlert1: false,
 				content1: '当前登入信息验证失败,是否重新登录?',
 				isShowAlert: false,
@@ -149,7 +150,7 @@
 				showTran: true,
 				companyId: 1,
 				current: 4,
-				sgId:''
+				sgId: ''
 			}
 		},
 
@@ -191,7 +192,7 @@
 			uni.hideKeyboard()
 			uni.showTabBar()
 			this.loadData()
-			this.isShowAcquisitionInfo=this.utils.getRoles('acquisitionInfor.view')
+			this.isShowAcquisitionInfo = this.utils.getRoles('acquisitionInfor.view')
 			this.getStatus()
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 				console.log("checkSession", res)
@@ -260,16 +261,16 @@
 			console.log("this.userInfo", this.userInfo)
 		},
 		methods: {
-			getStatus(){
+			getStatus() {
 				let _obj = {
-					commonId:uni.getStorageSync("userInfo").id,
+					commonId: uni.getStorageSync("userInfo").id,
 				}
-				this.$api.doRequest('get', '/acquisitionInfo/getInfo',_obj ).then(res => {
+				this.$api.doRequest('get', '/acquisitionInfo/getInfo', _obj).then(res => {
 					if (res.data.code == 200) {
-						if(res.data.data){
+						if (res.data.data) {
 							this.status = res.data.data.status
 							this.sgId = res.data.data.commonId
-						}else{
+						} else {
 							this.status = '已隐藏'
 						}
 					}
@@ -985,7 +986,8 @@
 			font-size: 16px;
 		}
 	}
-	.content2{
+
+	.content2 {
 		display: flex;
 		justify-content: space-between;
 	}