This commit is contained in:
lzttt 2024-10-12 12:41:42 +08:00
commit ff1d7088ef
10 changed files with 230 additions and 85 deletions

View File

@ -0,0 +1,59 @@
<template>
<div class="long-text">
<div>{{ truncatedText }}</div>
<el-button type="text" @click="toggleShowAll" v-if="isExpanded">{{showAll?'收起':'展开'}}</el-button>
</div>
</template>
<script>
export default {
props: {
text: {
type: String,
required: true
},
maxLength: {
type: Number,
default: 20
}
},
data() {
return {
showAll: false,
localMaxLength: this.maxLength,
}
},
computed: {
truncatedText() {
if (this.text.length <= this.localMaxLength) {
return this.text;
}
return `${this.text.substring(0, this.maxLength)}...`;
},
isExpanded() {
return this.text.length > this.maxLength;
}
},
methods: {
toggleShowAll() {
if (this.showAll) { //true->false
this.localMaxLength = this.maxLength;
;
}
if (!this.showAll) {
this.localMaxLength = Infinity;
}
this.showAll = !this.showAll
}
}
}
</script>
<style scoped>
.long-text {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
}
</style>

View File

@ -6,7 +6,8 @@
</el-form-item> </el-form-item>
<el-form-item label="公告状态" prop="status"> <el-form-item label="公告状态" prop="status">
<el-select v-model="queryParams.status" placeholder="公告状态" clearable> <el-select v-model="queryParams.status" placeholder="公告状态" clearable>
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)" :key="parseInt(dict.value)" :label="dict.label" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)" :key="parseInt(dict.value)"
:label="dict.label"
:value="parseInt(dict.value)"/> :value="parseInt(dict.value)"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -19,14 +20,18 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleUpdate" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleUpdate"
>新增 >新增
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="noticeList"> <el-table v-loading="loading" :data="noticeList">
<el-table-column type="selection" width="55" align="center"/> <el-table-column label="序号" align="center" width="80">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="公告标题" align="center" prop="title" :show-overflow-tooltip="true"/> <el-table-column label="公告标题" align="center" prop="title" :show-overflow-tooltip="true"/>
<el-table-column label="公告类型" align="center" prop="type" width="100"> <el-table-column label="公告类型" align="center" prop="type" width="100">
<template v-slot="scope"> <template v-slot="scope">
@ -38,18 +43,22 @@
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内容" align="center" prop="content" :show-overflow-tooltip="true" /> <el-table-column label="内容" align="center" prop="content">
<template slot-scope="scope">
<TruncatedText :text="scope.row.content"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope"> <template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
>修改 >修改
</el-button> </el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
>删除 >删除
</el-button> </el-button>
<!-- <el-button size="mini" type="text" @click="handlePush(scope.row.id)"--> <!-- <el-button size="mini" type="text" @click="handlePush(scope.row.id)"-->
<!-- >推送--> <!-- >推送-->
<!-- </el-button>--> <!-- </el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -63,24 +72,25 @@
<script> <script>
import {pageNotice, removeNotice} from '@/api/base/notice' import {pageNotice, removeNotice} from '@/api/base/notice'
import BaseNoticeForm from "@/views/base/notice/form/BaseNoticeForm.vue"; import BaseNoticeForm from "@/views/base/notice/form/BaseNoticeForm.vue";
import TruncatedText from "@/components/truncatedText/TruncatedText.vue";
export default { export default {
name: "BaseNotice", name: "BaseNotice",
components: {BaseNoticeForm}, components: {TruncatedText, BaseNoticeForm},
props:{ props: {
parentServer:{ parentServer: {
type: String, type: String,
default: null, default: null,
required: true, required: true,
}, },
server:{ server: {
type: String, type: String,
default: null, default: null,
required: true required: true
} }
}, },
data(){ data() {
return{ return {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@ -98,20 +108,20 @@ export default {
mounted() { mounted() {
this.getList(); this.getList();
}, },
methods:{ methods: {
/** 查询公告列表 */ /** 查询公告列表 */
async getList(){ async getList() {
this.loading = true this.loading = true
try { try {
const res = await pageNotice(this.queryParams) const res = await pageNotice(this.queryParams)
this.noticeList = res.data.records this.noticeList = res.data.records
this.total = res.data.total this.total = res.data.total
}finally { } finally {
this.loading = false this.loading = false
} }
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery(){ handleQuery() {
this.queryParams.pageNo = 1 this.queryParams.pageNo = 1
this.getList(); this.getList();
}, },
@ -132,10 +142,11 @@ export default {
await removeNotice(ids) await removeNotice(ids)
await this.getList() await this.getList()
this.$modal.msgSuccess("删除成功") this.$modal.msgSuccess("删除成功")
}catch {} } catch {
}
}, },
/** 推送按钮操作 */ /** 推送按钮操作 */
handlePush(id){ handlePush(id) {
} }
} }
@ -143,5 +154,4 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>

View File

@ -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)

View File

@ -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")
} }
} }
} }

View File

@ -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

View File

@ -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>

View File

@ -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"/>

View File

@ -506,7 +506,7 @@ export default {
}, },
// init // init
createInit() { createInit() {
this.formData.bookingId = this.formData?.bookingId.toString() || null this.formData.bookingId = this.formData?.bookingId?.toString() || null
// //
this.formData.ticketNo = this.formData.ticketNo || createUniqueCodeByHead("GD") this.formData.ticketNo = this.formData.ticketNo || createUniqueCodeByHead("GD")
// //

View File

@ -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");
} }

View File

@ -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">