|
|
@@ -3,12 +3,19 @@
|
|
|
<!-- 花材基本信息 -->
|
|
|
<form @submit="formSubmit">
|
|
|
<view class="module-com input-line-wrap">
|
|
|
-
|
|
|
+ <view style="color:red;background-color: yellow;font-size:29upx;font-weight:bold;padding-top:20upx;padding-bottom:20upx;text-align:center;" v-if="productData.repeatId && productData.repeatId>0"
|
|
|
+ @click="pageTo({url: '/admin/item/detail?id='+productData.repeatId})">
|
|
|
+ 存在重复编号花材,点击查看,请务必删除其中一个
|
|
|
+ </view>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="productData.id && productData.id>0">
|
|
|
+ <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>
|
|
|
+ </tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">名称</view>
|
|
|
<input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请填写名称" @input="fillName($event)" maxlength="50" type="text" />
|
|
|
</tui-list-cell>
|
|
|
-
|
|
|
<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;">
|
|
|
@@ -242,7 +249,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,modifyOnStockFn } from "@/api/product";
|
|
|
+import { addProduct,updateProduct,getProductDetail,py,print,modifyOnStockFn,delStatusUpdate } from "@/api/product";
|
|
|
import { getPtItemDetail } from "@/api/pt-item";
|
|
|
import { mapGetters } from "vuex"
|
|
|
//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
|
|
|
@@ -345,6 +352,20 @@ export default {
|
|
|
that.$msg(res.msg)
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ delProduct(info){
|
|
|
+ let that = this
|
|
|
+ that.$util.confirmModal({content:'确认删除?'},() => {
|
|
|
+ delStatusUpdate({id:info.id,delStatus:1}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg('删除成功')
|
|
|
+ that.init()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getItemId(info){
|
|
|
+ this.$msg('花材编号:'+info.id)
|
|
|
},
|
|
|
ptAuth(info){
|
|
|
let that = this
|