|
@@ -5,7 +5,7 @@
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">名称</div>
|
|
<div class="tui-title">名称</div>
|
|
|
- <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="产品名称" @input="fillName($event)" maxlength="50" type="text" />
|
|
|
|
|
|
|
+ <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="产品名称" maxlength="50" type="text" />
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -15,12 +15,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
- <div class="tui-title">拼音缩写</div>
|
|
|
|
|
- <input v-model="form.py" placeholder-class="phcolor" class="tui-input" name="py" placeholder="拼音首字母组合" maxlength="50" type="text" />
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
-
|
|
|
|
|
- <tui-list-cell class="line-cell" :arrow="true">
|
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
<div class="tui-title">分类</div>
|
|
<div class="tui-title">分类</div>
|
|
|
<input v-model="form.classId" name="classId" type="text" hidden />
|
|
<input v-model="form.classId" name="classId" type="text" hidden />
|
|
|
<view style="color:#CCCCCC;width:450upx;height:45upx;" @click.stop="changeClass()" v-if="form.classId == 0">
|
|
<view style="color:#CCCCCC;width:450upx;height:45upx;" @click.stop="changeClass()" v-if="form.classId == 0">
|
|
@@ -78,7 +73,7 @@
|
|
|
import { getAllItemClass } from "@/api/item-class";
|
|
import { getAllItemClass } from "@/api/item-class";
|
|
|
import { getAllUnit } from "@/api/unit";
|
|
import { getAllUnit } from "@/api/unit";
|
|
|
import { getAllCpClass,addCpFn,updateCpFn } from "@/api/cp"
|
|
import { getAllCpClass,addCpFn,updateCpFn } from "@/api/cp"
|
|
|
- import { addProduct,updateProduct,getProductDetail,py } from "@/api/product";
|
|
|
|
|
|
|
+ import { addProduct,updateProduct,getProductDetail } from "@/api/product";
|
|
|
import { getPtItemDetail } from "@/api/pt-item";
|
|
import { getPtItemDetail } from "@/api/pt-item";
|
|
|
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
|
|
@@ -98,7 +93,6 @@
|
|
|
form: {
|
|
form: {
|
|
|
id:0,
|
|
id:0,
|
|
|
name:"",
|
|
name:"",
|
|
|
- py:"",
|
|
|
|
|
classId:0,
|
|
classId:0,
|
|
|
className:'',
|
|
className:'',
|
|
|
cover:[],
|
|
cover:[],
|
|
@@ -154,14 +148,6 @@
|
|
|
this.form.status = 2
|
|
this.form.status = 2
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- fillName(event){
|
|
|
|
|
- let val = event.target.value
|
|
|
|
|
- py({ name:val }).then(res => {
|
|
|
|
|
- if(res.data.py){
|
|
|
|
|
- this.form.py = res.data.py
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
goBack(){
|
|
goBack(){
|
|
|
uni.navigateBack({ delta: 1 })
|
|
uni.navigateBack({ delta: 1 })
|
|
|
},
|
|
},
|
|
@@ -289,11 +275,6 @@
|
|
|
rule: ["required"],
|
|
rule: ["required"],
|
|
|
msg: ["请填写名称"]
|
|
msg: ["请填写名称"]
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- name: "py",
|
|
|
|
|
- rule: ["required"],
|
|
|
|
|
- msg: ["请填写拼音缩写"]
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
name: "classId",
|
|
name: "classId",
|
|
|
rule: ["required"],
|
|
rule: ["required"],
|