|
|
@@ -7,12 +7,12 @@
|
|
|
@search="searchFn"
|
|
|
/>
|
|
|
</view>
|
|
|
- <app-tabs
|
|
|
- :tabs="tabs"
|
|
|
- :currentTab="tabIndex"
|
|
|
- @change="change"
|
|
|
- itemWidth="50%"
|
|
|
- />
|
|
|
+<!-- <app-tabs-->
|
|
|
+<!-- :tabs="tabs"-->
|
|
|
+<!-- :currentTab="tabIndex"-->
|
|
|
+<!-- @change="change"-->
|
|
|
+<!-- itemWidth="50%"-->
|
|
|
+<!-- />-->
|
|
|
<view class="scroll-middle_bx">
|
|
|
<scroll-view
|
|
|
scroll-y
|
|
|
@@ -84,6 +84,7 @@
|
|
|
"
|
|
|
@customNum="customNum"
|
|
|
@add="addEvent"
|
|
|
+ @addOneEvent="addCustomNumEvent"
|
|
|
@del="delEvent"
|
|
|
></Commondity>
|
|
|
</template>
|
|
|
@@ -117,12 +118,14 @@
|
|
|
<view class="select-cmd_bx" v-if="customData">
|
|
|
<view class="kc"> 库存{{ customData.stock }} </view>
|
|
|
<view class="num_bx">
|
|
|
- <input v-model="customData.bigCount" type="number" />扎
|
|
|
- <input
|
|
|
- v-model="customData.smallCount"
|
|
|
- type="number"
|
|
|
- style="margin-left:24upx"
|
|
|
- />支
|
|
|
+ <allMoreSelectInput
|
|
|
+ :isActive="isActive" :isFocus="isFocus" :value="customData.bigCount"
|
|
|
+ :isActiveOne="isActiveOne" :isFocusOne="isFocusOne" :valueOne="customData.smallCount"
|
|
|
+ @deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"
|
|
|
+ @deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">
|
|
|
+ </allMoreSelectInput>
|
|
|
+<!-- <input v-model="customData.bigCount" type="number" />扎-->
|
|
|
+<!-- <input v-model="customData.smallCount" type="number" style="margin-left:24upx"/>支-->
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -153,6 +156,8 @@ import Commondity from "@/components/module/app-commodity";
|
|
|
import FooterCart from "@/components/module/app-footer-cart";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
import productMins from "@/mixins/product";
|
|
|
+import allMoreSelectInput from "@/components/module/allMoreSelectInput";
|
|
|
+import allMoreSelectInputMins from "@/mixins/allMoreSelectInput";
|
|
|
export default {
|
|
|
name: "allotEx", // 开单
|
|
|
components: {
|
|
|
@@ -161,9 +166,10 @@ export default {
|
|
|
AppWrapperEmpty,
|
|
|
Commondity,
|
|
|
ModalModule,
|
|
|
- FooterCart
|
|
|
+ FooterCart,
|
|
|
+ allMoreSelectInput
|
|
|
},
|
|
|
- mixins: [productMins],
|
|
|
+ mixins: [productMins,allMoreSelectInputMins],
|
|
|
data() {
|
|
|
return {
|
|
|
pageType: "inventory",
|
|
|
@@ -202,42 +208,28 @@ export default {
|
|
|
customNum(info) {
|
|
|
this.isModel = true;
|
|
|
this.customData = info;
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.initAllInput();
|
|
|
+ })
|
|
|
},
|
|
|
modalCancel() {
|
|
|
this.isModel = false;
|
|
|
this.customData = {};
|
|
|
}, // 取消 确认
|
|
|
affirm(val) {
|
|
|
- if (val.index === 0) {
|
|
|
- this.modalCancel();
|
|
|
- } else {
|
|
|
- const {
|
|
|
- bigCount,
|
|
|
- smallCount,
|
|
|
- bigNum,
|
|
|
- bigUnit,
|
|
|
- smallNum,
|
|
|
- smallUnit,
|
|
|
- ratio
|
|
|
- } = this.customData;
|
|
|
- const ratioNum = Number(ratio);
|
|
|
-
|
|
|
- //超过库存时 设置为库存最大值
|
|
|
- if (
|
|
|
- Number(bigCount) * ratioNum + Number(smallCount) >
|
|
|
- Number(bigNum) * ratioNum + Number(smallNum)
|
|
|
- ) {
|
|
|
- uni.showToast({
|
|
|
- title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- this.customData.bigCount = bigNum;
|
|
|
- this.customData.smallCount = smallNum;
|
|
|
+ this.isFocus = false;
|
|
|
+ this.isFocusOne = false;
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ if(this.customData.bigCount==0 && this.customData.smallCount==0){
|
|
|
+ this.delAllEvent(this.customData)}
|
|
|
+ if (val.index === 0) {
|
|
|
+ this.modalCancel();
|
|
|
} else {
|
|
|
this.updateItemEvent(this.customData);
|
|
|
this.modalCancel();
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
cancelEvent() {
|
|
|
this.showSubmitModel = false;
|
|
|
@@ -246,8 +238,7 @@ export default {
|
|
|
if (val.index === 0) {
|
|
|
this.cancelEvent();
|
|
|
} else {
|
|
|
- console.log(444, this.selectList);
|
|
|
-
|
|
|
+ // console.log(444, this.selectList);
|
|
|
uni.navigateBack({
|
|
|
delta: 1
|
|
|
});
|