|
|
@@ -26,7 +26,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="summary-bar">
|
|
|
- <view class="operate-view" @click="gobackEvent">
|
|
|
+ <view class="operate-view" @click="goBackFn">
|
|
|
<text class="iconfont icongouwuche"></text>返回修改
|
|
|
</view>
|
|
|
<view class="describe-view">
|
|
|
@@ -127,7 +127,6 @@
|
|
|
</view>
|
|
|
<button class="admin-button-com blue middle" v-if="canIEdit" @click="formSubmit">确认</button>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -163,7 +162,6 @@ export default {
|
|
|
pickCharge: "",
|
|
|
localCharge: "",
|
|
|
entryTime: "",
|
|
|
- ghsId: null,
|
|
|
yfPayWay:1,
|
|
|
remark:"",
|
|
|
avgKgWeight:''
|
|
|
@@ -176,11 +174,7 @@ export default {
|
|
|
perKgFreight:0,
|
|
|
};
|
|
|
},
|
|
|
- onLoad(option) {
|
|
|
- this.form.ghsId = option.ghsId
|
|
|
- if(!this.$util.isEmpty(option.ghsId)){
|
|
|
- this.selectJobId = option.ghsId
|
|
|
- }
|
|
|
+ onLoad() {
|
|
|
if(this.myShopInfo.cgModel == 1){
|
|
|
this.form.avgKgWeight = this.myShopInfo.cgPerCost
|
|
|
}
|
|
|
@@ -235,7 +229,10 @@ export default {
|
|
|
},
|
|
|
...mapActions(["initMerchantInfo"]),
|
|
|
init() {
|
|
|
- this._getDet();
|
|
|
+ if(!this.$util.isEmpty(this.option.ghsId)){
|
|
|
+ this.selectJobId = this.option.ghsId
|
|
|
+ }
|
|
|
+ this.getDetail();
|
|
|
},
|
|
|
inputFn(e) {
|
|
|
let price = Number(this.selectAllPrice);
|
|
|
@@ -265,7 +262,7 @@ export default {
|
|
|
this.totalFreight = (packingCharge+longCharge+shortCharge+localCharge+pickCharge).toFixed(2)
|
|
|
this.perKgFreight = (this.totalFreight / this.calcTotalWeight).toFixed(2)
|
|
|
},
|
|
|
- _getDet() {
|
|
|
+ getDetail() {
|
|
|
let data = uni.getStorageSync("modifyShopB");
|
|
|
if (this.$util.isEmpty(data)) return;
|
|
|
Object.keys(this.form).forEach((i, index) => {
|
|
|
@@ -300,13 +297,6 @@ export default {
|
|
|
} catch (error) {
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
- changeCustomerFn(e) {
|
|
|
- console.log("changeCustomerFn", e);
|
|
|
- this.supplier = e;
|
|
|
- this.form.ghsId = e.id;
|
|
|
- },
|
|
|
-
|
|
|
onCityConfirm(e) {
|
|
|
this.form.province = e.provinceName;
|
|
|
this.form.city = e.cityName;
|
|
|
@@ -338,7 +328,7 @@ export default {
|
|
|
await this.initMerchantInfo()
|
|
|
}
|
|
|
uni.showLoading({mask:true})
|
|
|
- const res = await createPurchaseOrderApi({...formData,modifyPrice:this.modifyPrice,cgModel:this.myShopInfo.cgModel})
|
|
|
+ const res = await createPurchaseOrderApi({...formData,modifyPrice:this.modifyPrice,cgModel:this.myShopInfo.cgModel,ghsId:this.option.ghsId})
|
|
|
uni.hideLoading()
|
|
|
uni.setStorageSync('flowersItemInfo', itemInfo)
|
|
|
this.removeFromSaveDirect()
|
|
|
@@ -359,8 +349,8 @@ export default {
|
|
|
this.$msg(checkRes);
|
|
|
}
|
|
|
},
|
|
|
- gobackEvent() {
|
|
|
- this.pageTo({url: '/pagesPurchase/add',query:{ghsId:this.option.ghsId,ghsName:this.option.ghsName},type:2})
|
|
|
+ goBackFn() {
|
|
|
+ this.pageTo({url: '/pagesPurchase/add?ghsId='+this.option.ghsId+'&ghsName='+this.option.ghsName,type:2})
|
|
|
}
|
|
|
}
|
|
|
};
|