|
|
@@ -3,10 +3,17 @@
|
|
|
<!-- 花材基本信息 -->
|
|
|
<form @submit="formSubmit">
|
|
|
<view class="module-com input-line-wrap">
|
|
|
+ <block v-if="!$util.isEmpty(productData) && productData.delStatus == 1">
|
|
|
+ <view style="color:red;background-color: yellow;font-size:29upx;font-weight:bold;padding-top:20upx;padding-bottom:20upx;text-align:center;">
|
|
|
+ 已删除
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
<view style="color:red;background-color: yellow;font-size:29upx;font-weight:bold;padding-top:20upx;padding-bottom:20upx;text-align:center;" v-if="productData.repeatId && productData.repeatId>0"
|
|
|
@click="pageTo({url: '/admin/item/detail?id='+productData.repeatId})">
|
|
|
存在重复编号花材,点击查看,请删除其中一个
|
|
|
</view>
|
|
|
+ </block>
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="productData.id && productData.id>0">
|
|
|
<view class="tui-title">编号</view>
|
|
|
<view style="color:#CCCCCC;width:300upx;" @click="getItemId(productData)">{{productData.itemId?productData.itemId:0}}</view>
|
|
|
@@ -312,6 +319,7 @@ export default {
|
|
|
smallUnitSelectedData:{},
|
|
|
bigUnitSelectedData:{},
|
|
|
hasRequest:0,
|
|
|
+ onShowRefresh:0,
|
|
|
productData:{id:0},
|
|
|
headers:{token:''},
|
|
|
cost:0,
|
|
|
@@ -330,6 +338,22 @@ export default {
|
|
|
}
|
|
|
const token = uni.getStorageSync('token')
|
|
|
this.headers.token = token
|
|
|
+
|
|
|
+ //重复花材,删除花材之后,返回上一页花材,需要刷新
|
|
|
+ let pages = getCurrentPages();
|
|
|
+ let prevPage = pages[ pages.length - 2 ];
|
|
|
+ prevPage.$vm.onShowRefresh = 1
|
|
|
+ prevPage.$vm.hasRequest = 0
|
|
|
+
|
|
|
+ },
|
|
|
+ onShow(){
|
|
|
+ //重复花材,删除花材之后,返回上一页花材,需要刷新
|
|
|
+ if(this.onShowRefresh == 1){
|
|
|
+ if(this.hasRequest == 0){
|
|
|
+ this.init()
|
|
|
+ this.onShowRefresh = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
showChangeOnStock(item){
|
|
|
@@ -361,7 +385,8 @@ export default {
|
|
|
that.$util.confirmModal({content:'确认删除?'},() => {
|
|
|
delStatusUpdate({id:info.id,delStatus:1}).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
- that.getDetail()
|
|
|
+ that.hasRequest = 0
|
|
|
+ that.init()
|
|
|
that.$msg('删除成功')
|
|
|
}
|
|
|
})
|
|
|
@@ -637,7 +662,7 @@ export default {
|
|
|
if(!this.$util.isEmpty(this.option.ptItemId)){
|
|
|
uni.setNavigationBarTitle({title: "确认花材信息"})
|
|
|
}
|
|
|
-
|
|
|
+ //onShow不能重新请求数据,不然好像会造成上传图片有问题
|
|
|
if(this.hasRequest == 1){
|
|
|
return
|
|
|
}
|