|
|
@@ -12,26 +12,21 @@
|
|
|
</view>
|
|
|
<!-- 按钮操作 -->
|
|
|
<view class="open-box">
|
|
|
-
|
|
|
<view class="button-area">
|
|
|
- <view class="active" @click="clearItemFn">清空</view>
|
|
|
<view class="active" @click="cancel">取消</view>
|
|
|
<view class="active" @click="confirmModify">确认</view>
|
|
|
+ <view class="active" @click="clearItemFn">清空</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
<!-- 清空 -->
|
|
|
<uni-popup ref="clearItemRef" type="dialog">
|
|
|
<uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认清空?" @confirm="confirmClearItem"></uni-popup-dialog>
|
|
|
</uni-popup>
|
|
|
-
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { mapGetters } from "vuex";
|
|
|
+import { mapGetters } from "vuex"
|
|
|
import rightItem from './components/rightItem.vue'
|
|
|
import leftArea from './components/leftArea.vue'
|
|
|
import productMins from "@/mixins/product"
|
|
|
@@ -77,13 +72,18 @@ export default {
|
|
|
const product = this.selectList.map(e => {
|
|
|
return { productId: e.id, unitType:e.unitType,num:e.currentNum}
|
|
|
})
|
|
|
- uni.showLoading({mask:true})
|
|
|
modifyItem({product:JSON.stringify(product),id:this.option.id}).then(res=>{
|
|
|
- uni.hideLoading()
|
|
|
if(res.code == 1){
|
|
|
this.$msg('修改成功')
|
|
|
+
|
|
|
+ //返回上一页带参数
|
|
|
+ let pages = getCurrentPages();
|
|
|
+ let prevPage = pages[ pages.length - 2 ];
|
|
|
+ //修改上一页data里面的modifyInfo
|
|
|
+ prevPage.$vm.modifyInfo = {hasModify:1}
|
|
|
+
|
|
|
setTimeout(function(){
|
|
|
- uni.navigateBack({delta: 1})
|
|
|
+ uni.navigateBack()
|
|
|
},1500)
|
|
|
}
|
|
|
})
|