shish 1 год назад
Родитель
Сommit
93f055f3f8

+ 24 - 27
ghsApp/src/pagesStorehouse/inventory/details.vue

@@ -31,31 +31,31 @@
 				</t-tr>
 				<t-tr v-for="(item, index) in dataInfo.itemInfo || []" :key="index">
 
-				<t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color" >
-					<view v-if="column.custom == 'icon'" class="list-icon" style="width:245upx;"  @click.stop="goToStockDetail(item)">
-						<image class="icon-image" :src="item.itemCover" />
-						<view class="icon-info">
-							<view class="info-name"> {{ item.itemName }} </view>
-							<view class="info-type"></view>
+					<t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color" >
+						<view v-if="column.custom == 'icon'" class="list-icon" style="width:245upx;">
+							<image class="icon-image" :src="item.itemCover" @click.stop="pageTo({url:'/admin/item/detail?id='+item.productId})" />
+							<view class="icon-info" @click.stop="pageTo({url:'/admin/item/detail?id='+item.productId})">
+								<view class="info-name"> {{ item.itemName }} </view>
+								<view class="info-type"></view>
+							</view>
 						</view>
-					</view>
-					<view v-else-if="column.custom == 'stock'" @click.stop="goToStockDetail(item)" 
-					:class="[ item.bigNumProfitLoss == 0 ? 'normal-show' : 'error-show']">
-						<text>{{ item.bigNumStock }}扎</text>
-						<text v-if="Number(item.smallNumStock)>0">{{ item.smallNumStock }}支</text>
-					</view>
-					<view v-else-if="column.custom == 'inventory'" @click.stop="goToStockDetail(item)" 
-					:class="[ item.bigNumProfitLoss == 0 ? 'normal-show' : 'error-show']">
-						<text>{{ item.bigNum?parseFloat(item.bigNum):0 }}扎</text>
-						<text v-if="Number(item.smallNum)>0">{{ item.smallNum?parseFloat(item.smallNum):0 }}支</text>
-					</view>
-					<view v-else-if="column.custom == 'profit'" @click.stop="goToStockDetail(item)" 
-					:class="[ item.bigNumProfitLoss == 0 ? 'normal-show' : 'error-show']">
-						<text>{{ item.bigNumProfitLoss }}扎</text>
-						<text v-if="Number(item.smallNumProfitLoss)>0">{{ item.smallNumProfitLoss }}支</text>
-					</view>
-					<view v-else @click.stop="goToStockDetail(item)" style="color: #333333;">{{ item[column.dataIndex] || "" }}</view>
-				</t-td>
+						<view v-else-if="column.custom == 'stock'"  
+						:class="[ item.bigNumProfitLoss == 0 ? 'normal-show' : 'error-show']">
+							<text>{{ item.bigNumStock }}扎</text>
+							<text v-if="Number(item.smallNumStock)>0">{{ item.smallNumStock }}支</text>
+						</view>
+						<view v-else-if="column.custom == 'inventory'"  
+						:class="[ item.bigNumProfitLoss == 0 ? 'normal-show' : 'error-show']">
+							<text>{{ item.bigNum?parseFloat(item.bigNum):0 }}扎</text>
+							<text v-if="Number(item.smallNum)>0">{{ item.smallNum?parseFloat(item.smallNum):0 }}支</text>
+						</view>
+						<view v-else-if="column.custom == 'profit'"  
+						:class="[ item.bigNumProfitLoss == 0 ? 'normal-show' : 'error-show']">
+							<text>{{ item.bigNumProfitLoss }}扎</text>
+							<text v-if="Number(item.smallNumProfitLoss)>0">{{ item.smallNumProfitLoss }}支</text>
+						</view>
+						<view v-else  style="color: #333333;">{{ item[column.dataIndex] || "" }}</view>
+					</t-td>
 
 				</t-tr>
 			</t-table>
@@ -160,9 +160,6 @@ export default {
 	methods: {
 		init(){
 
-		},
-		goToStockDetail(item){
-			this.$util.pageTo({url: "/pagesStorehouse/stockWarn/detailed?id="+item.id+'&name='+item.itemName})
 		},
 		async initData() {
 			try {

+ 20 - 6
ghsApp/src/pagesStorehouse/inventory/update.vue

@@ -175,7 +175,8 @@ export default {
 				that.saveCheckOrder(type);
 			})
 		},
-		async saveCheckOrder(type) {
+		saveCheckOrder(type) {
+			let that = this
 			let pdType = this.option.pdType ? this.option.pdType: ''
 			let params = {
 				remark: this.remark,
@@ -194,13 +195,26 @@ export default {
 			params.itemInfo = JSON.stringify(formatList);
 			//type 1直接确定 2保存草稿后在确定
 			if(type==1){
-				await checkOrderApi(params)
+				checkOrderApi(params).then(res=>{
+					if(res.code == 1){
+						that.$msg("盘点成功");
+						that.removeFromSaveDirect()
+						setTimeout(() => {
+							that.$util.pageTo({ url: "/pagesStorehouse/inventory/details?orderSn="+that.res.data.orderSn})	
+						}, 1200)
+					}
+				})
 			}else{
-				await updateCheckOrderApi(params)
+				updateCheckOrderApi(params).then(res=>{
+					if(res.code == 1){
+						that.$msg("提交成功");
+						that.removeFromSaveDirect()
+						setTimeout(() => {
+							that.$util.pageTo({ url: "/pagesStorehouse/inventory/details?orderSn="+that.res.data.orderSn})	
+						}, 1200)
+					}
+				})
 			}
-			this.$msg("盘点成功");
-			this.removeFromSaveDirect()
-			uni.navigateBack({delta: 1})
 		},
 	}
 };