|
@@ -16,8 +16,8 @@
|
|
|
</block>
|
|
</block>
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="productData.id && productData.id>0">
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="productData.id && productData.id>0">
|
|
|
<view class="tui-title">编号</view>
|
|
<view class="tui-title">编号</view>
|
|
|
- <view style="color:#CCCCCC;width:300upx;" @click="getItemId(productData)">{{productData.itemId?productData.itemId:0}}</view>
|
|
|
|
|
- <button v-if="productData.id > 0" class="admin-button-com default mini-btn" @click="delProduct(productData)">删除花材</button>
|
|
|
|
|
|
|
+ <view style="color:#CCCCCC;width:300upx;" @click="getProductId(productData)">{{productData.itemId?productData.itemId:0}}</view>
|
|
|
|
|
+ <button v-if="productData.id > 0" class="admin-button-com blue mini-btn" @click="moreDo()">更多操作</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">名称</view>
|
|
<view class="tui-title">名称</view>
|
|
@@ -68,13 +68,13 @@
|
|
|
<tui-list-cell class="line-cell" :arrow="false" :hover="false">
|
|
<tui-list-cell class="line-cell" :arrow="false" :hover="false">
|
|
|
<view class="tui-title">成本</view>
|
|
<view class="tui-title">成本</view>
|
|
|
<input v-model="form.cost" style="width:300upx;" placeholder-class="phcolor" @focus="form.cost=''" class="tui-input" name="cost" placeholder="请输入" type="digit"/>
|
|
<input v-model="form.cost" style="width:300upx;" placeholder-class="phcolor" @focus="form.cost=''" class="tui-input" name="cost" placeholder="请输入" type="digit"/>
|
|
|
- <button v-if="productData.id > 0" class="admin-button-com blue middle" @click="goCostDetail(productData)">变动记录</button>
|
|
|
|
|
|
|
+ <button v-if="productData.id > 0" class="admin-button-com blue middle" @click="goCostDetail(productData)">成本记录</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title" style="color:#3385FF;font-weight:bold;">库存</view>
|
|
<view class="tui-title" style="color:#3385FF;font-weight:bold;">库存</view>
|
|
|
<input v-model="form.stock" style="width:300upx;" placeholder-class="phcolor" @focus="form.stock=''" @input="changeStock($event)" class="tui-input" name="stock" placeholder="请输入" type="digit"/>
|
|
<input v-model="form.stock" style="width:300upx;" placeholder-class="phcolor" @focus="form.stock=''" @input="changeStock($event)" class="tui-input" name="stock" placeholder="请输入" type="digit"/>
|
|
|
- <button v-if="productData.id > 0" class="admin-button-com blue middle" @click="goStockDetail(productData)">变动记录</button>
|
|
|
|
|
|
|
+ <button v-if="productData.id > 0" class="admin-button-com blue middle" @click="goStockDetail(productData)">库存记录</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -252,6 +252,29 @@
|
|
|
</template>
|
|
</template>
|
|
|
</modal-module>
|
|
</modal-module>
|
|
|
|
|
|
|
|
|
|
+ <uni-popup ref="rightShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
|
|
|
|
|
+ <view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
|
|
+ <view style="width:100vw;margin-top:8upx;"><button @click="goWaste(productData)">报损</button></view>
|
|
|
|
|
+ <view style="width:100vw;margin-top:8upx;"><button @click="orderRecord(productData)">下单记录</button></view>
|
|
|
|
|
+ <view style="width:100vw;margin-top:8upx;"><button @click="copyCreate(productData)">复制新建</button></view>
|
|
|
|
|
+ <view style="width:100vw;margin-top:8upx;"><button @click="onStockChange(productData)">路上库存变动</button></view>
|
|
|
|
|
+ <view style="width:100vw;margin-top:8upx;"><button @click="delProduct(productData)">删除</button></view>
|
|
|
|
|
+ <view style="width:100vw;margin-top:30upx;"><button @click="closeMoreDoPop()">取消</button></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </uni-popup>
|
|
|
|
|
+
|
|
|
|
|
+ <modal-module :show="wasteShow" @click="wasteConfirm" :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:61.8%;text-align:center;" @blur="wasteBlur" :focus="wasteFocus" v-model="wasteNum" :adjust-position="false" class="inp-input" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </modal-module>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -263,6 +286,7 @@ import { applyAuth } from '@/api/item';
|
|
|
import { getAllUnit } from "@/api/unit";
|
|
import { getAllUnit } from "@/api/unit";
|
|
|
import { addProduct,updateProduct,getProductDetail,py,print,modifyOnStockFn,delStatusUpdate } from "@/api/product";
|
|
import { addProduct,updateProduct,getProductDetail,py,print,modifyOnStockFn,delStatusUpdate } from "@/api/product";
|
|
|
import { getPtItemDetail } from "@/api/pt-item";
|
|
import { getPtItemDetail } from "@/api/pt-item";
|
|
|
|
|
+import { wastage } from "@/api/order";
|
|
|
import { mapGetters } from "vuex"
|
|
import { mapGetters } from "vuex"
|
|
|
//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
|
|
//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
|
|
|
import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
|
|
import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
|
|
@@ -326,7 +350,10 @@ export default {
|
|
|
printItemId:0,
|
|
printItemId:0,
|
|
|
printNum:'',
|
|
printNum:'',
|
|
|
printLabelShow:false,
|
|
printLabelShow:false,
|
|
|
- printFocus:false
|
|
|
|
|
|
|
+ printFocus:false,
|
|
|
|
|
+ wasteNum:'',
|
|
|
|
|
+ wasteShow:false,
|
|
|
|
|
+ wasteFocus:false,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed:{
|
|
computed:{
|
|
@@ -356,6 +383,63 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ onStockChange(info){
|
|
|
|
|
+ this.closeMoreDoPop()
|
|
|
|
|
+ this.pageTo({url: '/pagesStorehouse/stockWarn/onStockChange?id='+info.id+'&name='+info.name})
|
|
|
|
|
+ },
|
|
|
|
|
+ goWaste(info){
|
|
|
|
|
+ this.closeMoreDoPop()
|
|
|
|
|
+ this.wasteShow = true
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ setTimeout(x => {
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ that.wasteFocus = true
|
|
|
|
|
+ })
|
|
|
|
|
+ }, 300)
|
|
|
|
|
+ },
|
|
|
|
|
+ wasteBlur(){
|
|
|
|
|
+ this.wasteFocus = false
|
|
|
|
|
+ },
|
|
|
|
|
+ closeWastePop(){
|
|
|
|
|
+ this.wasteShow = false
|
|
|
|
|
+ this.wasteFocus = false
|
|
|
|
|
+ this.wasteNum = ''
|
|
|
|
|
+ },
|
|
|
|
|
+ wasteConfirm(val){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ if (val.index == 0) {
|
|
|
|
|
+ this.closeWastePop()
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Number(that.wasteNum)<0){
|
|
|
|
|
+ that.$msg('请填写数量')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ let product = [{ productId:that.productData.id,bigNum:that.wasteNum,smallNum:null,classId:0,itemId:that.productData.itemId,ratio:that.productData.ratio }]
|
|
|
|
|
+ that.$util.confirmModal({content:'确认报损?'},() => {
|
|
|
|
|
+ wastage({product:JSON.stringify(product),remark:''}).then((res) => {
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.closeWastePop()
|
|
|
|
|
+ that.hasRequest = 0
|
|
|
|
|
+ that.init()
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ orderRecord(info){
|
|
|
|
|
+ this.closeMoreDoPop()
|
|
|
|
|
+ this.pageTo({url: "/admin/order/itemOrder?productId="+info.id})
|
|
|
|
|
+ },
|
|
|
|
|
+ moreDo(){
|
|
|
|
|
+ this.$refs.rightShowMore.open('top')
|
|
|
|
|
+ },
|
|
|
|
|
+ copyCreate(info){
|
|
|
|
|
+ this.closeMoreDoPop()
|
|
|
|
|
+ this.pageTo({url: '/admin/item/copy?id='+info.id})
|
|
|
|
|
+ },
|
|
|
|
|
+ closeMoreDoPop(){
|
|
|
|
|
+ this.$refs.rightShowMore.close()
|
|
|
|
|
+ },
|
|
|
showChangeOnStock(item){
|
|
showChangeOnStock(item){
|
|
|
let that = this
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'了解修改后的影响,确认要修改?'},() => {
|
|
that.$util.confirmModal({content:'了解修改后的影响,确认要修改?'},() => {
|
|
@@ -382,6 +466,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
delProduct(info){
|
|
delProduct(info){
|
|
|
let that = this
|
|
let that = this
|
|
|
|
|
+ this.closeMoreDoPop()
|
|
|
that.$util.confirmModal({content:'确认删除?'},() => {
|
|
that.$util.confirmModal({content:'确认删除?'},() => {
|
|
|
delStatusUpdate({id:info.id,delStatus:1}).then(res=>{
|
|
delStatusUpdate({id:info.id,delStatus:1}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
@@ -392,8 +477,8 @@ export default {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- getItemId(info){
|
|
|
|
|
- this.$msg('花材编号 '+info.id)
|
|
|
|
|
|
|
+ getProductId(info){
|
|
|
|
|
+ this.$msg('花材唯一编号 '+info.id)
|
|
|
},
|
|
},
|
|
|
ptAuth(info){
|
|
ptAuth(info){
|
|
|
let that = this
|
|
let that = this
|