|
@@ -6,26 +6,28 @@
|
|
|
<view class="module-com">
|
|
<view class="module-com">
|
|
|
<view class="commodity-view">
|
|
<view class="commodity-view">
|
|
|
<view class="commodity-list">
|
|
<view class="commodity-list">
|
|
|
- <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
|
|
|
|
|
- <image class="item-icon" :src="item.cover" alt="商品图" />
|
|
|
|
|
- <view class="item-info">
|
|
|
|
|
- <view class="info-line">
|
|
|
|
|
- <text class="item-name">{{ item.itemName }}</text>
|
|
|
|
|
- <text class="item-price">
|
|
|
|
|
- <text class="unit"></text>
|
|
|
|
|
- <text class="price">
|
|
|
|
|
- <text v-if="item.bigCount > 0">{{`${item.bigCount}`}}扎</text>
|
|
|
|
|
- <text v-if="item.smallCount > 0">{{`${item.smallCount}`}}支</text>
|
|
|
|
|
|
|
+ <template v-if="!$util.isEmpty(selectList)">
|
|
|
|
|
+ <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
|
|
|
|
|
+ <image class="item-icon" :src="item.cover" />
|
|
|
|
|
+ <view class="item-info">
|
|
|
|
|
+ <view class="info-line">
|
|
|
|
|
+ <text class="item-name">{{ item.name || '' }}</text>
|
|
|
|
|
+ <text class="item-price">
|
|
|
|
|
+ <text class="unit"></text>
|
|
|
|
|
+ <text class="price">
|
|
|
|
|
+ <text v-if="item.bigCount > 0">{{`${item.bigCount}`}}{{item.bigUnit}}</text>
|
|
|
|
|
+ <text v-if="item.smallCount > 0">{{`${item.smallCount}`}}{{item.smallUnit}}</text>
|
|
|
|
|
+ </text>
|
|
|
</text>
|
|
</text>
|
|
|
- </text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="info-line">
|
|
|
|
|
- <text class="item-type"></text>
|
|
|
|
|
- <text class="item-count">
|
|
|
|
|
- </text>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="info-line">
|
|
|
|
|
+ <text class="item-type" v-if="item.ratioType == 0">{{item.ratio}}{{item.smallUnit}}/{{item.bigUnit}}</text>
|
|
|
|
|
+ <text class="item-type" v-else>若干{{item.smallUnit}}/{{item.bigUnit}}</text>
|
|
|
|
|
+ <text class="item-count"></text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </template>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="summary-bar">
|
|
<view class="summary-bar">
|
|
|
<view class="operate-view" @click="gobackEvent">
|
|
<view class="operate-view" @click="gobackEvent">
|
|
@@ -51,9 +53,12 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="under-bar">
|
|
<view class="under-bar">
|
|
|
<view class="price-view"></view>
|
|
<view class="price-view"></view>
|
|
|
- <button class="admin-button-com blue big" @click="affirmFormSubmit">提交</button>
|
|
|
|
|
|
|
+ <button class="admin-button-com blue big" style="width:200upx;" @click="affirmFormSubmit">提交</button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
+ <view v-if="isScanEnv" @click="changeGet" style="width:125upx;height:125upx;display:flex;justify-content:center;align-items:center;font-size:60upx;
|
|
|
|
|
+ background:#3385ff;color:white;z-index:9999;position:fixed;bottom:160upx;right:40upx;border-radius:60upx;">{{calc=='add'?'+':'-'}}</view>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
@@ -68,6 +73,7 @@ import appFormRadioBtn from "@/components/app-formRadio-btn";
|
|
|
import appAddressGroup from "@/components/app-address-group";
|
|
import appAddressGroup from "@/components/app-address-group";
|
|
|
import appSendTime from "@/components/app-send-time";
|
|
import appSendTime from "@/components/app-send-time";
|
|
|
import appFormSend from "@/components/app-form-send";
|
|
import appFormSend from "@/components/app-form-send";
|
|
|
|
|
+const formUtil = require("@/utils/formValidation.js");
|
|
|
import { partItem } from "@/api/part";
|
|
import { partItem } from "@/api/part";
|
|
|
import { mapActions, mapGetters } from "vuex";
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
export default {
|
|
export default {
|
|
@@ -111,8 +117,9 @@ export default {
|
|
|
needPrint:1,
|
|
needPrint:1,
|
|
|
},
|
|
},
|
|
|
money: "",
|
|
money: "",
|
|
|
- showCustomer: false,
|
|
|
|
|
selectJobType: "part",
|
|
selectJobType: "part",
|
|
|
|
|
+ calc:'add',
|
|
|
|
|
+ isScanEnv:false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad (option) {
|
|
onLoad (option) {
|
|
@@ -134,14 +141,19 @@ export default {
|
|
|
if(option.customName){
|
|
if(option.customName){
|
|
|
this.form.customName = option.customName
|
|
this.form.customName = option.customName
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ if(this.$util.isScanEnv()){
|
|
|
|
|
+ this.isScanEnv = true
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
+
|
|
|
|
|
+ this.listenScanItem()
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
- onShow(){
|
|
|
|
|
- if(!this.$util.isEmpty(uni.getStorageSync("newClient"))){
|
|
|
|
|
- this.showCustomer = true;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
onUnload(){
|
|
onUnload(){
|
|
|
- uni.removeStorageSync('newClient');
|
|
|
|
|
|
|
+ uni.removeStorageSync('newClient')
|
|
|
|
|
+ uni.$off('listenGetScanCode')
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters(["getMerchantInfo", "getLoginInfo"]),
|
|
...mapGetters(["getMerchantInfo", "getLoginInfo"]),
|
|
@@ -150,6 +162,9 @@ export default {
|
|
|
...mapActions(["initMerchantInfo"]),
|
|
...mapActions(["initMerchantInfo"]),
|
|
|
init () {
|
|
init () {
|
|
|
this._getDet();
|
|
this._getDet();
|
|
|
|
|
+ },
|
|
|
|
|
+ changeGet(){
|
|
|
|
|
+ this.calc = this.calc == 'add' ? 'sub' : 'add'
|
|
|
},
|
|
},
|
|
|
payWayChange(e){
|
|
payWayChange(e){
|
|
|
let index = e.detail.value
|
|
let index = e.detail.value
|
|
@@ -211,12 +226,12 @@ export default {
|
|
|
bigNum: ele.bigCount,
|
|
bigNum: ele.bigCount,
|
|
|
smallNum: ele.smallCount,
|
|
smallNum: ele.smallCount,
|
|
|
classId: ele.classId,
|
|
classId: ele.classId,
|
|
|
- itemId: ele.itemId
|
|
|
|
|
|
|
+ itemId: ele.itemId,
|
|
|
|
|
+ ratio:ele.ratio
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
that.$util.confirmModal({content:'确认拆散?'},() => {
|
|
that.$util.confirmModal({content:'确认拆散?'},() => {
|
|
|
partItem({product:JSON.stringify(product),remark:that.form.remark}).then((res) => {
|
|
partItem({product:JSON.stringify(product),remark:that.form.remark}).then((res) => {
|
|
|
- //删除记忆
|
|
|
|
|
that.removeFromSaveDirect()
|
|
that.removeFromSaveDirect()
|
|
|
const {data: { id, orderSn },} = res;
|
|
const {data: { id, orderSn },} = res;
|
|
|
that.pageTo({url: '/admin/part/result',type:2})
|
|
that.pageTo({url: '/admin/part/result',type:2})
|
|
@@ -271,14 +286,15 @@ export default {
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
align-items: flex-end;
|
|
align-items: flex-end;
|
|
|
.item-name {
|
|
.item-name {
|
|
|
- color: #666;
|
|
|
|
|
- font-size: 28upx;
|
|
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ font-size: 32upx;
|
|
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
}
|
|
|
.item-price {
|
|
.item-price {
|
|
|
color: #333;
|
|
color: #333;
|
|
|
font-size: 22upx;
|
|
font-size: 22upx;
|
|
|
.price {
|
|
.price {
|
|
|
- font-size: 32upx;
|
|
|
|
|
|
|
+ font-size: 30upx;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -309,8 +325,8 @@ export default {
|
|
|
font-size: 30upx;
|
|
font-size: 30upx;
|
|
|
font-weight:bold;
|
|
font-weight:bold;
|
|
|
.iconfont {
|
|
.iconfont {
|
|
|
- margin-right: 20upx;
|
|
|
|
|
- font-size: 40upx;
|
|
|
|
|
|
|
+ margin-right:10upx;
|
|
|
|
|
+ font-size:32upx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.describe-view {
|
|
.describe-view {
|
|
@@ -402,9 +418,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .admin-button-com {
|
|
|
|
|
- width: 200upx;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|