优化部分代码与采购、领料关联配件库
This commit is contained in:
parent
5f3c59fa93
commit
1e061b101b
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-select v-model="partSelected" ref="selectTable" clearable :style="'width: ' + selectWidth" @blur="$emit('input-blur', $event)">
|
<el-select v-model="partSelected" ref="selectTable" clearable filterable :filter-method="listPart" :style="'width: ' + selectWidth" @blur="$emit('input-blur', $event)">
|
||||||
<el-option style="display: none" v-for="part in partList" :key="part.id" :label="part.name" :value="part.id"/>
|
<el-option style="display: none" v-for="part in partList" :key="part.id" :label="part.name" :value="part.id"/>
|
||||||
<el-table :data="partList" style="width: 100%" v-loading="loading" @row-click="handleSelectionChange">
|
<el-table :data="partList" style="width: 100%" v-loading="loading" @row-click="handleSelectionChange">
|
||||||
<el-table-column label="序号" align="center" width="80">
|
<el-table-column label="序号" align="center" width="80">
|
||||||
@ -8,20 +8,21 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="商品名称" prop="name" width="120"/>-->
|
<!-- <el-table-column label="商品名称" prop="name" width="120"/>-->
|
||||||
<el-table-column
|
<!-- <el-table-column-->
|
||||||
width="180"
|
<!-- width="180"-->
|
||||||
align="right">
|
<!-- align="right">-->
|
||||||
<template slot="header" slot-scope="scope">
|
<!-- <template slot="header" slot-scope="scope">-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="queryParams.name"
|
<!-- v-model="queryParams.name"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
@keyup.enter.native="listPart"
|
<!-- @keyup.enter.native="listPart"-->
|
||||||
placeholder="输入关键字搜索"/>
|
<!-- placeholder="输入关键字搜索"/>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
{{scope.row.name}}
|
<!-- {{scope.row.name}}-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
|
<el-table-column label="商品名称" prop="name" width="180" />
|
||||||
<el-table-column label="规格" prop="model" width="120"/>
|
<el-table-column label="规格" prop="model" width="120"/>
|
||||||
<el-table-column label="商品编码" prop="code" width="120"/>
|
<el-table-column label="商品编码" prop="code" width="120"/>
|
||||||
<el-table-column label="可用库存" prop="stock" width="80"/>
|
<el-table-column label="可用库存" prop="stock" width="80"/>
|
||||||
@ -110,7 +111,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// TODO 获取商品信息
|
// TODO 获取商品信息
|
||||||
async listPart() {
|
async listPart(val) {
|
||||||
|
this.queryParams.name = val
|
||||||
try{
|
try{
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const res = await getWaresPage(this.queryParams)
|
const res = await getWaresPage(this.queryParams)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 采购员/领料人 组件 -->
|
<!-- 采购员/领料人 组件 -->
|
||||||
<el-form-item :label="staffRole" prop="user">
|
<el-form-item :label="staffRole" prop="user">
|
||||||
<StaffChoose v-model="formData.user"/>
|
<StaffChoose v-model="formData.user" :is-get="'true'"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -32,6 +32,10 @@
|
|||||||
<PartChoose @selected="getPart"/>
|
<PartChoose @selected="getPart"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-button v-if="soByType" type="primary" size="small" @click="newWares">新增商品</el-button>
|
||||||
|
<el-button v-else type="primary" size="small" @click="newInStock">急件采购</el-button>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 商品表格 组件 -->
|
<!-- 商品表格 组件 -->
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
@ -58,6 +62,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<WaresForm ref="waresForm" @success="pushData" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -69,10 +74,14 @@ import SoTable from "@/views/repair/stockOperate/Components/SoTable.vue";
|
|||||||
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
||||||
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
|
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
|
||||||
import {createRepairSo} from "@/api/repair/stockOperate/stockOperate";
|
import {createRepairSo} from "@/api/repair/stockOperate/stockOperate";
|
||||||
|
import {getWaresByName} from "@/api/repair/wares";
|
||||||
|
import WaresForm from "@/views/repair/wares/WaresForm.vue";
|
||||||
|
import router from "@/router";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SoInfo",
|
name: "SoInfo",
|
||||||
components: {
|
components: {
|
||||||
|
WaresForm,
|
||||||
StaffChoose,
|
StaffChoose,
|
||||||
PartChoose,
|
PartChoose,
|
||||||
SoTable,
|
SoTable,
|
||||||
@ -84,6 +93,11 @@ export default {
|
|||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
soType:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
required: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -108,6 +122,9 @@ export default {
|
|||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
router() {
|
||||||
|
return router
|
||||||
|
},
|
||||||
// 得到选择的员工
|
// 得到选择的员工
|
||||||
getStaff(data) {
|
getStaff(data) {
|
||||||
this.formData.userId = data.id
|
this.formData.userId = data.id
|
||||||
@ -142,11 +159,12 @@ export default {
|
|||||||
this.formData.goodsList = data.map(item => {
|
this.formData.goodsList = data.map(item => {
|
||||||
return {
|
return {
|
||||||
goodsId: item.id,
|
goodsId: item.id,
|
||||||
goodsType: "0",
|
goodsType: this.soType ? "1": "0",
|
||||||
wareId: item.wareId,
|
wareId: item.wareId,
|
||||||
goodsCount: item.count,
|
goodsCount: item.count,
|
||||||
goodsPrice: item.newPrice,
|
goodsPrice: item.newPrice,
|
||||||
remark: item.remark
|
remark: item.remark,
|
||||||
|
soiType: this.soByType ? "01" : "02"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -178,6 +196,10 @@ export default {
|
|||||||
this.formData.soNo = createUniqueCodeByHead(this.soByType ? "CG" : "LL")
|
this.formData.soNo = createUniqueCodeByHead(this.soByType ? "CG" : "LL")
|
||||||
this.staffRole = this.soByType ? this.staffRole : "领料人"
|
this.staffRole = this.soByType ? this.staffRole : "领料人"
|
||||||
this.partList = []
|
this.partList = []
|
||||||
|
if (this.soType){
|
||||||
|
this.formData.soType = this.soType
|
||||||
|
this.formData.purchaseType = '02'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 提交前的构建
|
// 提交前的构建
|
||||||
async createInit(){
|
async createInit(){
|
||||||
@ -194,6 +216,23 @@ export default {
|
|||||||
supplierName: data?.supplier?.name
|
supplierName: data?.supplier?.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 新增商品
|
||||||
|
newWares(){
|
||||||
|
this.$refs.waresForm.open(null);
|
||||||
|
},
|
||||||
|
// 新增商品回调
|
||||||
|
async pushData(name){
|
||||||
|
const res = await getWaresByName(name)
|
||||||
|
const data = res.data
|
||||||
|
this.partList.push({
|
||||||
|
...data,
|
||||||
|
wareId: data.warehouse
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 急件采购
|
||||||
|
newInStock(){
|
||||||
|
this.$router.push("/repair/stock/repair-soi?active=purchaseCreate&soType=03")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
<el-table-column label="商品编码" align="center" width="180" prop="code"/>
|
<el-table-column label="商品编码" align="center" width="180" prop="code"/>
|
||||||
<el-table-column label="仓库" align="center" width="150" prop="warehouse">
|
<el-table-column label="仓库" align="center" width="150" prop="warehouse">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<WarehouseChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.ware" @change="changeWare(scope.row)"/>
|
<WarehouseChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.ware"
|
||||||
|
@change="changeWare(scope.row)"/>
|
||||||
<span class="item__txt">{{ scope.row.warehouseName }}</span>
|
<span class="item__txt">{{ scope.row.warehouseName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -31,21 +32,24 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" align="center" width="150" prop="count">
|
<el-table-column label="数量" align="center" width="150" prop="count">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.count" placeholder="请输入内容"></el-input>
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.count"
|
||||||
|
placeholder="请输入内容"></el-input>
|
||||||
<span class="item__txt">{{ scope.row.count }}</span>
|
<span class="item__txt">{{ scope.row.count }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="soByType ? '上次进价' : '成本'" align="center" width="150" prop="price"/>
|
<el-table-column :label="soByType ? '上次进价' : '成本'" align="center" width="150" prop="purPrice"/>
|
||||||
<el-table-column v-if="soByType" label="采购单价" align="center" width="150" prop="newPrice">
|
<el-table-column v-if="soByType" label="采购单价" align="center" width="150" prop="newPrice">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.newPrice" placeholder="请输入内容"></el-input>
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.newPrice"
|
||||||
|
placeholder="请输入内容"></el-input>
|
||||||
<span class="item__txt">{{ scope.row.newPrice }}</span>
|
<span class="item__txt">{{ scope.row.newPrice }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="soByType ? '采购金额' : '合计'" align="center" width="150" prop="totalPrice"/>
|
<el-table-column :label="soByType ? '采购金额' : '合计'" align="center" width="150" prop="totalPrice"/>
|
||||||
<el-table-column label="备注" align="center" width="180" prop="remark">
|
<el-table-column label="备注" align="center" width="180" prop="remark">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.remark" placeholder="请输入内容"></el-input>
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.remark"
|
||||||
|
placeholder="请输入内容"></el-input>
|
||||||
<span class="item__txt">{{ scope.row.remark }}</span>
|
<span class="item__txt">{{ scope.row.remark }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -91,16 +95,16 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
partList(val) {
|
partList(val) {
|
||||||
if (val && val.length > 0) {
|
if (val && val.length > 0) {
|
||||||
const data = val[val.length - 1]
|
this.list = val.map(item => {
|
||||||
const newData = {
|
return {
|
||||||
...data,
|
...item,
|
||||||
count: 1,
|
count: 1,
|
||||||
totalPrice: data.price * 1,
|
totalPrice: item.purPrice * 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
newPrice: data.price,
|
newPrice: item.purPrice,
|
||||||
}
|
}
|
||||||
this.list.push(newData)
|
})
|
||||||
}else {
|
} else {
|
||||||
this.list = []
|
this.list = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -182,7 +186,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 保存数据 */
|
/** 保存数据 */
|
||||||
save (row) {
|
save(row) {
|
||||||
|
if (!this.soByType && row.stock < row.count){
|
||||||
|
row.count = 1
|
||||||
|
this.$modal.msgError("库存数量不足")
|
||||||
|
}
|
||||||
// 更新表格的数据
|
// 更新表格的数据
|
||||||
row.totalPrice = row.count * row.newPrice
|
row.totalPrice = row.count * row.newPrice
|
||||||
const id = row.id
|
const id = row.id
|
||||||
@ -192,8 +200,8 @@ export default {
|
|||||||
})
|
})
|
||||||
this.clickCellMap[id] = []
|
this.clickCellMap[id] = []
|
||||||
},
|
},
|
||||||
changeWare(row){
|
changeWare(row) {
|
||||||
if (row.ware){
|
if (row.ware) {
|
||||||
row['wareId'] = row.ware.id
|
row['wareId'] = row.ware.id
|
||||||
row['warehouse'] = row.ware.id
|
row['warehouse'] = row.ware.id
|
||||||
row['warehouseName'] = row.ware.name
|
row['warehouseName'] = row.ware.name
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-tabs v-model="activeTab">
|
<el-tabs v-model="activeTab" @tab-click="changeTab">
|
||||||
<el-tab-pane label="采购单据" name="purchase">
|
<el-tab-pane label="采购单据" name="purchase">
|
||||||
<SoIndex :so-by-type="soByType"/>
|
<SoIndex :so-by-type="soByType"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="急件单据" name="urgentPurchase">-->
|
<el-tab-pane label="急件单据" name="urgentPurchase">
|
||||||
<!-- <SoIndex :so-by-type="soByType" :goods-yes="true"/>-->
|
<SoIndex :so-by-type="soByType" :goods-yes="true"/>
|
||||||
<!-- </el-tab-pane>-->
|
</el-tab-pane>
|
||||||
<el-tab-pane label="作废单据" name="voidPurchase">
|
<el-tab-pane label="作废单据" name="voidPurchase">
|
||||||
<SoVoid :so-by-type="soByType" />
|
<SoVoid :so-by-type="soByType" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@ -14,7 +14,7 @@
|
|||||||
<SoiTable :so-by-type="soByType" />
|
<SoiTable :so-by-type="soByType" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="采购单" name="purchaseCreate">
|
<el-tab-pane label="采购单" name="purchaseCreate">
|
||||||
<SoInfo :so-by-type="soByType"/>
|
<SoInfo :so-by-type="soByType" :so-type="soType"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -39,10 +39,12 @@ export default {
|
|||||||
return {
|
return {
|
||||||
activeTab: "purchase",
|
activeTab: "purchase",
|
||||||
soByType: true,
|
soByType: true,
|
||||||
|
soType: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.isType()
|
this.isType()
|
||||||
|
this.init()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 判断是什么单据,决定字段的属性、展示否等
|
// 判断是什么单据,决定字段的属性、展示否等
|
||||||
@ -50,6 +52,22 @@ export default {
|
|||||||
const url = this.$route.path
|
const url = this.$route.path
|
||||||
this.soByType = url.includes("soi")
|
this.soByType = url.includes("soi")
|
||||||
},
|
},
|
||||||
|
// 判断是点进来的还是跳转过来的
|
||||||
|
async init(){
|
||||||
|
const active = this.$route.query.active
|
||||||
|
if (active){
|
||||||
|
this.activeTab = active
|
||||||
|
}
|
||||||
|
const soType = this.$route.query.soType
|
||||||
|
if (soType){
|
||||||
|
this.soType = soType
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeTab(tab, event){
|
||||||
|
// if (this.soType){
|
||||||
|
// this.$router.push("/repair/stock/repair-soi")
|
||||||
|
// }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<el-input disabled v-model="formData.stNo" style="width: 20rem"/>
|
<el-input disabled v-model="formData.stNo" style="width: 20rem"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="调拨人" prop="user">
|
<el-form-item label="调拨人" prop="user">
|
||||||
<StaffChoose v-model="formData.user"/>
|
<StaffChoose v-model="formData.user" is-get="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选择商品" prop="goodsList">
|
<el-form-item label="选择商品" prop="goodsList">
|
||||||
<PartChoose @selected="getPart"/>
|
<PartChoose @selected="getPart"/>
|
||||||
|
@ -54,18 +54,13 @@
|
|||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="销售价格" prop="price">
|
<el-form-item label="进价" prop="purPrice">
|
||||||
<el-input-number v-model="formData.price" :precision="2" :step="0.1" ></el-input-number>
|
<el-input-number v-model="formData.purPrice" :precision="2" :step="0.1" ></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="默认仓库" prop="warehouse">
|
<el-form-item label="销售价格" prop="price">
|
||||||
<TreeSelect
|
<el-input-number v-model="formData.price" :precision="2" :step="0.1" ></el-input-number>
|
||||||
v-model="formData.warehouse"
|
|
||||||
:options="baseWarehouseTree"
|
|
||||||
:normalizer="normalizer"
|
|
||||||
placeholder="请选择仓库"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -85,19 +80,18 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="当前库存" prop="stock">
|
<el-form-item label="默认仓库" prop="warehouse">
|
||||||
<el-input-number v-model="formData.stock"></el-input-number>
|
<TreeSelect
|
||||||
|
v-model="formData.warehouse"
|
||||||
|
:options="baseWarehouseTree"
|
||||||
|
:normalizer="normalizer"
|
||||||
|
placeholder="请选择仓库"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="当前库存" prop="stock">
|
||||||
<el-switch
|
<el-input-number v-model="formData.stock"></el-input-number>
|
||||||
v-model="formData.status"
|
|
||||||
active-color="#13ce66"
|
|
||||||
inactive-color="#ff4949"
|
|
||||||
active-value="01"
|
|
||||||
inactive-value="02">
|
|
||||||
</el-switch>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -122,6 +116,17 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-switch
|
||||||
|
v-model="formData.status"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
active-value="01"
|
||||||
|
inactive-value="02">
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="适用子公司" prop="corpId">
|
<el-form-item label="适用子公司" prop="corpId">
|
||||||
<el-select v-model="formData.corpIds" multiple placeholder="请选择">
|
<el-select v-model="formData.corpIds" multiple placeholder="请选择">
|
||||||
@ -212,10 +217,12 @@ export default {
|
|||||||
dataForm: undefined,
|
dataForm: undefined,
|
||||||
corpIds: [],
|
corpIds: [],
|
||||||
status: '01',
|
status: '01',
|
||||||
|
purPrice: undefined
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
formRules: {
|
formRules: {
|
||||||
name: [{required: true, message: '商品名称不能为空', trigger: 'blur'}],
|
name: [{required: true, message: '商品名称不能为空', trigger: 'blur'}],
|
||||||
|
purPrice: [{required: true, message: '进价不能为空', trigger: 'blur'}],
|
||||||
price: [{required: true, message: '销售价格不能为空', trigger: 'blur'}],
|
price: [{required: true, message: '销售价格不能为空', trigger: 'blur'}],
|
||||||
unit: [{required: true, message: '计量单位不能为空', trigger: 'blur'}],
|
unit: [{required: true, message: '计量单位不能为空', trigger: 'blur'}],
|
||||||
type: [{required: true, message: '所属分类不能为空', trigger: 'blur'}],
|
type: [{required: true, message: '所属分类不能为空', trigger: 'blur'}],
|
||||||
@ -337,6 +344,7 @@ export default {
|
|||||||
dataForm: undefined,
|
dataForm: undefined,
|
||||||
corpIds: [],
|
corpIds: [],
|
||||||
status: '01',
|
status: '01',
|
||||||
|
purPrice: undefined
|
||||||
};
|
};
|
||||||
this.resetForm("formRef");
|
this.resetForm("formRef");
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
<el-table-column label="规格" align="left" prop="model"/>
|
<el-table-column label="规格" align="left" prop="model"/>
|
||||||
<el-table-column label="商品编码" align="left" prop="code"/>
|
<el-table-column label="商品编码" align="left" prop="code"/>
|
||||||
<el-table-column label="所属分类" align="left" prop="typeName"/>
|
<el-table-column label="所属分类" align="left" prop="typeName"/>
|
||||||
|
<el-table-column label="进价" align="right" prop="purPrice" />
|
||||||
<el-table-column label="销售价格" align="right" prop="price"/>
|
<el-table-column label="销售价格" align="right" prop="price"/>
|
||||||
<el-table-column label="条形码" align="left" prop="barCode"/>
|
<el-table-column label="条形码" align="left" prop="barCode"/>
|
||||||
<el-table-column label="计量单位" align="center" prop="unit">
|
<el-table-column label="计量单位" align="center" prop="unit">
|
||||||
|
Loading…
Reference in New Issue
Block a user