|
|
@@ -11,7 +11,7 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">初始名称</view>
|
|
|
- <view style="color:#CCCCCC;width:300upx;height:45upx;display:flex;align-items:center;overflow:hidden;" @click.stop="notModify">
|
|
|
+ <view style="color:#CCCCCC;width:300upx;height:45upx;display:flex;align-items:center;overflow:hidden;">
|
|
|
{{productData.ptItemInfo ? productData.ptItemInfo.name : ''}}
|
|
|
<image :src="`${constant.imgUrl}/icon/official8.png`" v-if="productData.auth == 1" mode="widthFix" style="width:38upx;height:38upx;display:inline-block;margin-left:10upx;"></image>
|
|
|
</view>
|
|
|
@@ -65,7 +65,7 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">路上库存</view>
|
|
|
- <view style="color:#CCCCCC;width:300upx;height:45upx;display:flex;align-items:center;overflow:hidden;" @click.stop="notModify">
|
|
|
+ <view style="color:#CCCCCC;width:300upx;height:45upx;display:flex;align-items:center;overflow:hidden;">
|
|
|
{{form.onStock}}
|
|
|
</view>
|
|
|
<button v-if="productData.id > 0" class="admin-button-com blue middle" @click="showChangeOnStock(productData)">修改数值</button>
|
|
|
@@ -221,6 +221,17 @@
|
|
|
</template>
|
|
|
</modal-module>
|
|
|
|
|
|
+ <modal-module :show="onStockShow" @click="onStockConfirm" :maskClosable="true" title="路上库存" padding="30rpx 30rpx" >
|
|
|
+ <template v-slot:content>
|
|
|
+ <div class="app-modal-input-wrap">
|
|
|
+ <div class="inp-list-line">
|
|
|
+ <div class="line-input">
|
|
|
+ <input type="number" ref="input" style="width:62%;text-align:center;" v-model="newOnStock" @focus="newOnStock=''" :adjust-position="false" class="inp-input" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -231,7 +242,7 @@ const form = require("@/utils/formValidation.js");
|
|
|
import { getAllItemClass } from "@/api/item-class";
|
|
|
import { applyAuth } from '@/api/item';
|
|
|
import { getAllUnit } from "@/api/unit";
|
|
|
-import { addProduct,updateProduct,getProductDetail,py,print } from "@/api/product";
|
|
|
+import { addProduct,updateProduct,getProductDetail,py,print,modifyOnStockFn } from "@/api/product";
|
|
|
import { getPtItemDetail } from "@/api/pt-item";
|
|
|
import { mapGetters } from "vuex"
|
|
|
//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
|
|
|
@@ -246,6 +257,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ onStockShow:false,
|
|
|
+ newOnStock:0,
|
|
|
status: 1,
|
|
|
currentImgData: [],
|
|
|
form: {
|
|
|
@@ -310,10 +323,25 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
showChangeOnStock(item){
|
|
|
-
|
|
|
+ this.onStockShow = true
|
|
|
+ this.newOnStock = item.onStock
|
|
|
},
|
|
|
- changeOnStockConfirm(){
|
|
|
-
|
|
|
+ onStockConfirm(val){
|
|
|
+ let that=this;
|
|
|
+ if (val.index == 0) {
|
|
|
+ that.onStockShow = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ uni.showLoading()
|
|
|
+ modifyOnStockFn({id:this.option.id,onStock:this.newOnStock}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ uni.hideLoading()
|
|
|
+ that.form.onStock = newOnStock
|
|
|
+ that.onStockShow = false
|
|
|
+ that.$forceUpdate()
|
|
|
+ that.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
ptAuth(info){
|
|
|
let that = this
|
|
|
@@ -449,9 +477,6 @@ export default {
|
|
|
fastSubmit(){
|
|
|
this.dialogInputConfirm({index: 1})
|
|
|
},
|
|
|
- notModify(){
|
|
|
- this.$msg('不可修改')
|
|
|
- },
|
|
|
goPriceDetail(item){
|
|
|
this.$util.pageTo({url: "/admin/changePrice/changeList?id="+item.id})
|
|
|
},
|