|
|
@@ -29,9 +29,10 @@
|
|
|
</checkbox-group>
|
|
|
</view>
|
|
|
<template v-if="!$util.isEmpty(info)">
|
|
|
- <button v-if="info.status == 3" class="admin-button-com big blue" style="width:55vw;margin-top:50upx;" @click="commitChange">确认入库并改价</button>
|
|
|
- <button v-if="info.status != 3" class="admin-button-com big blue" style="width:55vw;margin-top:50upx;" @click="commitChange">确认改价</button>
|
|
|
- <button v-if="info.status == 3" class="admin-button-com big default" style="width:55vw;margin-top:30upx;" @click="goBackFn">稍后入库并改价</button>
|
|
|
+ <button v-if="info.status == 3" class="admin-button-com big blue" style="width:55vw;margin-top:50upx;" @click="commitChange(1)">改价并入库</button>
|
|
|
+ <button v-if="info.status == 3" class="admin-button-com big blue" style="width:55vw;margin-top:50upx;" @click="confirmIn">仅入库不改价</button>
|
|
|
+ <button v-if="info.status != 3" class="admin-button-com big blue" style="width:55vw;margin-top:50upx;" @click="commitChange(2)">确认改价</button>
|
|
|
+ <button v-if="info.status == 3" class="admin-button-com big default" style="width:55vw;margin-top:30upx;" @click="goBackFn">稍后改价入库</button>
|
|
|
</template>
|
|
|
</template>
|
|
|
|
|
|
@@ -43,7 +44,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { getAllProductDataApi,batchChangePrice } from "@/api/product";
|
|
|
-import { getCgItemList,getPurchaseDetailApi } from "@/api/purchase";
|
|
|
+import { getCgItemList,getPurchaseDetailApi,confirmPutIn } from "@/api/purchase";
|
|
|
export default {
|
|
|
name: "pageSuccess",
|
|
|
data() {
|
|
|
@@ -71,6 +72,26 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ init(){
|
|
|
+
|
|
|
+ },
|
|
|
+ confirmIn(){
|
|
|
+ let that = this
|
|
|
+ that.$util.confirmModal({content:'确认只入库不改价?'},() => {
|
|
|
+ uni.showLoading({mask:true})
|
|
|
+ confirmPutIn({id:that.option.id}).then(res=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res.code == 1){
|
|
|
+ if(res.data.status == 4){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ setTimeout(function(){
|
|
|
+ uni.navigateBack()
|
|
|
+ },1300)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
priceFocus(i,res){
|
|
|
this.flowersList[i].autoPrice = ''
|
|
|
if(!this.$util.isEmpty(this.productList)){
|
|
|
@@ -146,7 +167,7 @@ export default {
|
|
|
})
|
|
|
this.productList = arr
|
|
|
},
|
|
|
- commitChange(){
|
|
|
+ commitChange(type){
|
|
|
let that = this
|
|
|
let hasError = false
|
|
|
let errorHint = ''
|
|
|
@@ -166,8 +187,14 @@ export default {
|
|
|
this.$msg(errorHint)
|
|
|
return false
|
|
|
}
|
|
|
-
|
|
|
- this.$util.confirmModal({content:'确认提交?'},() => {
|
|
|
+ let hint = '确认提交?'
|
|
|
+ if(type == 1){
|
|
|
+ hint = '确认改价并入库?'
|
|
|
+ }
|
|
|
+ if(type == 2){
|
|
|
+ hint = '确认改价?'
|
|
|
+ }
|
|
|
+ this.$util.confirmModal({content:hint},() => {
|
|
|
that.commitModify()
|
|
|
})
|
|
|
},
|