|
@@ -4,11 +4,11 @@
|
|
|
<view class="nav-left"> </view>
|
|
<view class="nav-left"> </view>
|
|
|
<!-- 已选花材列表 -->
|
|
<!-- 已选花材列表 -->
|
|
|
<view class="itemList-box">
|
|
<view class="itemList-box">
|
|
|
- <leftItem></leftItem>
|
|
|
|
|
|
|
+ <leftItem :changeSelectJobType.sync="selectJobType" :changeSelectJobId.sync="selectJobId"></leftItem>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 分类和花材图片 -->
|
|
<!-- 分类和花材图片 -->
|
|
|
<view class="all-item-area">
|
|
<view class="all-item-area">
|
|
|
- <rightItemArea> </rightItemArea>
|
|
|
|
|
|
|
+ <rightItemArea :changeSelectJobType.sync="selectJobType" :changeSelectJobId.sync="selectJobId"> </rightItemArea>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 按钮操作 -->
|
|
<!-- 按钮操作 -->
|
|
|
<view class="open-box">
|
|
<view class="open-box">
|
|
@@ -28,53 +28,23 @@ import { mapGetters } from "vuex";
|
|
|
import rightItemArea from './components/rightItemArea.vue'
|
|
import rightItemArea from './components/rightItemArea.vue'
|
|
|
import leftItem from './components/leftItem.vue'
|
|
import leftItem from './components/leftItem.vue'
|
|
|
import productMins from "@/mixins/product";
|
|
import productMins from "@/mixins/product";
|
|
|
|
|
+import { getFullInfo } from '@/api/work'
|
|
|
export default {
|
|
export default {
|
|
|
name: "modify",
|
|
name: "modify",
|
|
|
components: { rightItemArea,leftItem},
|
|
components: { rightItemArea,leftItem},
|
|
|
mixins: [productMins],
|
|
mixins: [productMins],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- //0成品 1花材
|
|
|
|
|
- currentProperty:0,
|
|
|
|
|
- itemList:[],
|
|
|
|
|
- currenSelectShop:{},
|
|
|
|
|
selectItem: {},
|
|
selectItem: {},
|
|
|
selectItemUser:{},
|
|
selectItemUser:{},
|
|
|
- isLogin:2,
|
|
|
|
|
- customId:0,
|
|
|
|
|
- selectJobType:'bill',
|
|
|
|
|
|
|
+ selectJobType:'modifyWork',
|
|
|
selectJobId:0,
|
|
selectJobId:0,
|
|
|
- chooseCustomer:false
|
|
|
|
|
|
|
+ orderItem:[]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters(["getLoginInfo"])
|
|
...mapGetters(["getLoginInfo"])
|
|
|
},
|
|
},
|
|
|
- onLoad() {
|
|
|
|
|
- this.initDataFromStorage()
|
|
|
|
|
- },
|
|
|
|
|
- onPullDownRefresh() {
|
|
|
|
|
- },
|
|
|
|
|
- onShow() {
|
|
|
|
|
- },
|
|
|
|
|
- mounted() {
|
|
|
|
|
- if(this.$util.isEmpty(this.getLoginInfo.admin) || this.getLoginInfo.admin.currentShopId == 0){
|
|
|
|
|
- this.isLogin = 0
|
|
|
|
|
- }else{
|
|
|
|
|
- this.isLogin = 1
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- watch:{
|
|
|
|
|
- getLoginInfo: {
|
|
|
|
|
- handler(newValue) {
|
|
|
|
|
- if(this.$util.isEmpty(newValue.admin) == false && newValue.admin.currentShopId > 0){
|
|
|
|
|
- this.isLogin = 1
|
|
|
|
|
- }else{
|
|
|
|
|
- this.isLogin = 0
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
cancel(){
|
|
cancel(){
|
|
|
uni.navigateBack({delta: 1})
|
|
uni.navigateBack({delta: 1})
|
|
@@ -82,18 +52,23 @@ export default {
|
|
|
confirmModify(){
|
|
confirmModify(){
|
|
|
uni.navigateBack({delta: 1})
|
|
uni.navigateBack({delta: 1})
|
|
|
},
|
|
},
|
|
|
- changeProperty(property){
|
|
|
|
|
- this.currentProperty = property
|
|
|
|
|
- },
|
|
|
|
|
- resetCustomer(){
|
|
|
|
|
- this.chooseCustomer = true
|
|
|
|
|
- },
|
|
|
|
|
- selectCustomer(info){
|
|
|
|
|
- this.customId = info.id ? parseInt(info.id) : 0
|
|
|
|
|
- this.selectJobId = this.customId
|
|
|
|
|
- },
|
|
|
|
|
- init() {
|
|
|
|
|
|
|
+ getOrderDetail(id){
|
|
|
|
|
+ getFullInfo({id}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ if(res.data.item && !this.$util.isEmpty(res.data.item)){
|
|
|
|
|
+ const newItem = res.data.item.map(ele=>{
|
|
|
|
|
+ return {property:1,name:ele.name,unitType:ele.unitType,unitPrice:ele.unitPrice,unitName:ele.unitName,buyNum:ele.num,id:ele.id}
|
|
|
|
|
+ })
|
|
|
|
|
+ this.setSelectInfo({ selectJobType: this.selectJobType, info: newItem,selectJobId:this.selectJobId })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
|
|
+ init(){
|
|
|
|
|
+ let id = this.option.id || 0
|
|
|
|
|
+ this.selectJobId = Number(id)
|
|
|
|
|
+ this.getOrderDetail(id)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|