|
@@ -9,14 +9,14 @@
|
|
<el-form ref="mainForm" :model="mainForm" label-width="100px" size="small" label-position="left">
|
|
<el-form ref="mainForm" :model="mainForm" label-width="100px" size="small" label-position="left">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="工程信息单" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入工程信息单"></el-input>
|
|
|
|
|
|
+ <el-form-item label="工程信息单" prop="orderNum">
|
|
|
|
+ <el-input v-model="mainForm.orderNum" placeholder="请输入工程信息单"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
|
|
<el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
|
|
- <el-form-item label="单据日期" prop="date">
|
|
|
|
|
|
+ <el-form-item label="单据日期" prop="orderDate">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
- v-model="mainForm.date"
|
|
|
|
|
|
+ v-model="mainForm.orderDate"
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
@@ -25,74 +25,76 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="品类" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入品类"></el-input>
|
|
|
|
|
|
+ <el-form-item label="产品大类" prop="mainId">
|
|
|
|
+ <el-select v-model="mainForm.mainId" placeholder="选择产品大类" style="width: 100%">
|
|
|
|
+ <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="经销商编码" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入经销商编码"></el-input>
|
|
|
|
|
|
+ <el-form-item label="经销商编码" prop="jxsNum">
|
|
|
|
+ <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="项目名称" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入项目名称"></el-input>
|
|
|
|
|
|
+ <el-form-item label="项目名称" prop="enginName">
|
|
|
|
+ <el-input v-model="mainForm.enginName" placeholder="请输入项目名称"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="单据类型" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入单据类型"></el-input>
|
|
|
|
|
|
+ <el-form-item label="单据类型" prop="orderType">
|
|
|
|
+ <el-input v-model="mainForm.orderType" placeholder="请输入单据类型"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="经销商名称" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入经销商名称"></el-input>
|
|
|
|
|
|
+ <el-form-item label="经销商名称" prop="jxsName">
|
|
|
|
+ <el-input v-model="mainForm.jxsName" placeholder="请输入经销商名称"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="使用单位" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入使用单位"></el-input>
|
|
|
|
|
|
+ <el-form-item label="使用单位" prop="company">
|
|
|
|
+ <el-input v-model="mainForm.company" placeholder="请输入使用单位"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="安装地址" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入安装地址"></el-input>
|
|
|
|
|
|
+ <el-form-item label="安装地址" prop="address">
|
|
|
|
+ <el-input v-model="mainForm.address" placeholder="请输入安装地址"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="工程编号" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入工程编号"></el-input>
|
|
|
|
|
|
+ <el-form-item label="工程编号" prop="enginNum">
|
|
|
|
+ <el-input v-model="mainForm.enginNum" placeholder="请输入工程编号"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="厂工程编码" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入厂工程编码"></el-input>
|
|
|
|
|
|
+ <el-form-item label="厂工程编码" prop="factoryNum">
|
|
|
|
+ <el-input v-model="mainForm.factoryNum" placeholder="请输入厂工程编码"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="工程登录类型" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入工程登录类型"></el-input>
|
|
|
|
|
|
+ <el-form-item label="工程登录类型" prop="loginType">
|
|
|
|
+ <el-input v-model="mainForm.loginType" placeholder="请输入工程登录类型"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="24" :lg="16">
|
|
<el-col :xs="24" :sm="24" :lg="16">
|
|
- <el-form-item label="备注" prop="warehouse">
|
|
|
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
<el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
|
|
<el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="业务员" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入业务员"></el-input>
|
|
|
|
|
|
+ <el-form-item label="业务员" prop="salesMan">
|
|
|
|
+ <el-input v-model="mainForm.salesMan" placeholder="请输入业务员"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
- <el-form-item label="制单人" prop="warehouse">
|
|
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入制单人"></el-input>
|
|
|
|
|
|
+ <el-form-item label="制单人" prop="createMan">
|
|
|
|
+ <el-input v-model="mainForm.createMan" placeholder="请输入制单人"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
|
|
<el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
|
|
- <el-form-item label="制单日期" prop="date">
|
|
|
|
|
|
+ <el-form-item label="制单日期" prop="createDate">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
- v-model="mainForm.date"
|
|
|
|
|
|
+ v-model="mainForm.createDate"
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
@@ -101,9 +103,9 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
|
|
<el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
|
|
- <el-form-item label="合同有效期" prop="date">
|
|
|
|
|
|
+ <el-form-item label="合同有效期" prop="contractDate">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
- v-model="mainForm.date"
|
|
|
|
|
|
+ v-model="mainForm.contractDate"
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
@@ -116,23 +118,66 @@
|
|
|
|
|
|
<div class="main-title">
|
|
<div class="main-title">
|
|
<div class="title">货品信息</div>
|
|
<div class="title">货品信息</div>
|
|
- <el-button type="primary" size="small" icon="el-icon-plus">添加货品</el-button>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="table" style="margin-top: 20px">
|
|
<div class="table" style="margin-top: 20px">
|
|
- <el-table :data="detailData.kingDeeTransferItems" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
|
|
|
|
|
|
+ <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
|
|
<el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
|
|
<el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
|
|
- <el-table-column align="center" label="销售类型" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品编码" prop="model" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品名称" prop="baseUnitId" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="规格型号" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="单位" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="单价" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="订单金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="备注" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="税率" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="center" label="销售类型" prop="saleTypeId" min-width="160" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-select v-model="scope.row.saleTypeId" placeholder="选择销售类型" size="small" @change="changeSaleType(scope.$index)">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in salesTypeList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.saleName"
|
|
|
|
+ :value="item.id">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="产品名称" prop="materialNumber" min-width="160" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-select v-model="scope.row.materialNumber" placeholder="选择产品" size="small" @change="changeGoods(scope.$index)">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in retailProductList"
|
|
|
|
+ :key="item.number"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.number">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="规格型号" prop="specification" min-width="200" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-input v-model="scope.row.price" size="small" type="number"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-input v-model="scope.row.qty" size="small" type="number"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="订单金额" min-width="100" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{(scope.row.price || 0) * (scope.row.qty || 0)}}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-input v-model="scope.row.remark" size="small"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="操作" width="100" fixed="right">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+ <div class="add"><el-button type="text" icon="el-icon-plus" @click="addGoods">添加产品</el-button></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="page-footer">
|
|
<div class="page-footer">
|
|
@@ -149,7 +194,8 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getDetail } from "@/api/supply/engin";
|
|
|
|
|
|
+import { getEnginDetail, getRetailProductList } from "@/api/supply/engin";
|
|
|
|
+import { getDictList, getTypeList } from '@/api/common'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'EnginForm',
|
|
name: 'EnginForm',
|
|
@@ -158,9 +204,14 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
detailData: {},
|
|
detailData: {},
|
|
|
|
+ goodsList: [],
|
|
mainForm: {
|
|
mainForm: {
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ typeList: [],
|
|
|
|
+ salesTypeList: [],
|
|
|
|
+ retailProductList: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -177,7 +228,13 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
created() {
|
|
created() {
|
|
- this.getDetail();
|
|
|
|
|
|
+ this.getTypeList();
|
|
|
|
+ this.getRetailProductList();
|
|
|
|
+ if(this.listItem) {
|
|
|
|
+ this.getDetail();
|
|
|
|
+ }else {
|
|
|
|
+
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -188,11 +245,71 @@ export default {
|
|
|
|
|
|
// 获取详情
|
|
// 获取详情
|
|
getDetail() {
|
|
getDetail() {
|
|
- getDetail({id: this.listItem.id}).then(res => {
|
|
|
|
|
|
+ getEnginDetail({id: this.listItem.enginInfoId}).then(res => {
|
|
this.detailData = res.data;
|
|
this.detailData = res.data;
|
|
|
|
+ this.goodsList = data.items;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ getDictList() {
|
|
|
|
+ getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
|
|
|
|
+ this.typeList = res.data;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 获取销售类型列表
|
|
|
|
+ getTypeList() {
|
|
|
|
+ getTypeList({
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: -1,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ this.salesTypeList = res.data.records;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 获取商品列表
|
|
|
|
+ getRetailProductList() {
|
|
|
|
+ getRetailProductList({
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: -1,
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.retailProductList = res.data.records;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // 修改销售类型
|
|
|
|
+ changeSaleType(index) {
|
|
|
|
+ if(this.goodsList[index].saleTypeId) {
|
|
|
|
+ let obj = this.salesTypeList.find(o => o.id == this.goodsList[index].saleTypeId);
|
|
|
|
+ this.goodsList[index].saleTypeName = obj.saleName;
|
|
|
|
+ this.goodsList[index].saleTypeCode = obj.saleCode;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 修改产品
|
|
|
|
+ changeGoods(index) {
|
|
|
|
+ if(this.goodsList[index].materialNumber) {
|
|
|
|
+ let obj = this.retailProductList.find(o => o.number == this.goodsList[index].materialNumber);
|
|
|
|
+ this.goodsList[index].materialName = obj.name;
|
|
|
|
+ this.goodsList[index].materialId = obj.materialId;
|
|
|
|
+ this.goodsList[index].specification = obj.specification;
|
|
|
|
+ this.goodsList[index].baseUnitId = obj.baseUnit;
|
|
|
|
+ this.goodsList[index].price = obj.batchPrice;
|
|
|
|
+ this.goodsList[index].taxRate = obj.taxRate;
|
|
|
|
+ this.goodsList[index].mainId = obj.mainId;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 添加产品
|
|
|
|
+ addGoods() {
|
|
|
|
+ this.goodsList.push({})
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 删除产品
|
|
|
|
+ deleteItem(index) {
|
|
|
|
+ this.goodsList.splice(index, 1);
|
|
|
|
+ },
|
|
|
|
+
|
|
clickSubmitForm() {
|
|
clickSubmitForm() {
|
|
|
|
|
|
},
|
|
},
|
|
@@ -219,4 +336,21 @@ export default {
|
|
padding-left: 10px;
|
|
padding-left: 10px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .add {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ border: 1px solid #EBEEF5;
|
|
|
|
+ border-top: none;
|
|
|
|
+ height: 50px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ::v-deep input::-webkit-outer-spin-button,
|
|
|
|
+ ::v-deep input::-webkit-inner-spin-button {
|
|
|
|
+ -webkit-appearance: none;
|
|
|
|
+ }
|
|
|
|
+ ::v-deep input[type='number'] {
|
|
|
|
+ -moz-appearance: textfield;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|