|
|
@@ -8,8 +8,9 @@
|
|
|
</view>
|
|
|
<scroll-view scroll-y scroll-with-animation class="main-view">
|
|
|
<view class="space-view ex-table">
|
|
|
- <view style="line-height:55upx;">
|
|
|
+ <view style="line-height:55upx;" v-if="!$util.isEmpty(selectList)">
|
|
|
<text v-for="(item, index) in selectList" :key="index" style="margin-right:36upx;font-size:30upx;" @click="delProduct(item)">{{ item.name }} {{ item.bigCount }} x</text>
|
|
|
+ <button @click="confirmChange()" class="admin-button-com blue mini-btn">确认提交</button>
|
|
|
</view>
|
|
|
<t-table :headerBackgroundColor="'#F0F2F6'">
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
@@ -27,7 +28,7 @@
|
|
|
<input type="text" v-model="productItem.bigCount" class="inp-input" style="border:1upx solid #CCCCCC;font-size:29upx;color:black;" />
|
|
|
</t-td>
|
|
|
<t-td>
|
|
|
- <button @click="addItem(productItem)" class="admin-button-com default middle">添加</button>
|
|
|
+ <button @click="tjItem(productItem)" class="admin-button-com blue middle">添加</button>
|
|
|
</t-td>
|
|
|
</t-tr>
|
|
|
</block>
|
|
|
@@ -51,6 +52,7 @@ import {mapActions, mapGetters} from "vuex";
|
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
|
import { getWeixinId } from "@/api/invite";
|
|
|
+import { addItem } from "@/api/order-item";
|
|
|
import productMins from "@/mixins/product";
|
|
|
export default {
|
|
|
components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect,AppSearchModule,ModalModule},
|
|
|
@@ -100,13 +102,28 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ confirmChange(){
|
|
|
+ let that = this
|
|
|
+ if(this.$util.isEmpty(this.selectList)){
|
|
|
+ this.$msg('请选择花材')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let id = this.option.id ? this.option.id : 0
|
|
|
+ that.$util.confirmModal({content:'确认提交?'},() => {
|
|
|
+ addItem({data:JSON.stringify(that.selectList),id:id}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ uni.navigateBack()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
delProduct(item){
|
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'确认删除?'},() => {
|
|
|
- that.delItem(item)
|
|
|
+ that.delSelectedItem(item)
|
|
|
})
|
|
|
},
|
|
|
- addItem(item){
|
|
|
+ tjItem(item){
|
|
|
this.customData = item
|
|
|
this.customData.userPrice = 0.1
|
|
|
this.confirmAddItemModel(this.customData)
|