|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="detail-container">
|
|
<div class="detail-container">
|
|
- <el-page-header @back="goBack" :content="listItem ? '编辑':'新增'"></el-page-header>
|
|
|
|
|
|
+ <el-page-header :content="listItem ? '编辑':'新增'" @back="goBack" />
|
|
|
|
|
|
<div class="main-title">
|
|
<div class="main-title">
|
|
<div class="title">工程信息单</div>
|
|
<div class="title">工程信息单</div>
|
|
@@ -10,7 +10,7 @@
|
|
<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="orderNum">
|
|
<el-form-item label="工程登录编号" prop="orderNum">
|
|
- <el-input v-model="mainForm.orderNum" placeholder="系统自动生成" disabled></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.orderNum" placeholder="系统自动生成" disabled />
|
|
</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;">
|
|
@@ -21,8 +21,8 @@
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
- placeholder="系统自动生成">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ placeholder="系统自动生成"
|
|
|
|
+ />
|
|
</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">
|
|
@@ -32,8 +32,8 @@
|
|
v-for="item in salesmanList"
|
|
v-for="item in salesmanList"
|
|
:key="item.adminUserId"
|
|
:key="item.adminUserId"
|
|
:label="item.nickName"
|
|
:label="item.nickName"
|
|
- :value="item.adminUserId">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ :value="item.adminUserId"
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -48,12 +48,12 @@
|
|
<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="jxsNum">
|
|
<el-form-item label="经销商编码" prop="jxsNum">
|
|
- <el-input v-model="mainForm.jxsNum" placeholder="选择经销商" disabled></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.jxsNum" placeholder="选择经销商" disabled />
|
|
</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="enginName">
|
|
<el-form-item label="项目名称" prop="enginName">
|
|
- <el-input v-model="mainForm.enginName" placeholder="请输入项目名称"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.enginName" placeholder="请输入项目名称" />
|
|
</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">
|
|
@@ -61,26 +61,28 @@
|
|
<el-select v-model="mainForm.machineType" placeholder="选择机型类别" size="small" clearable style="width: 100%">
|
|
<el-select v-model="mainForm.machineType" placeholder="选择机型类别" size="small" clearable style="width: 100%">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in machineTypeList"
|
|
v-for="item in machineTypeList"
|
|
- :key="item.dictCode" :label="item.dictValue" :value="item.dictCode">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ :key="item.dictCode"
|
|
|
|
+ :label="item.dictValue"
|
|
|
|
+ :value="item.dictCode"
|
|
|
|
+ />
|
|
</el-select>
|
|
</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="jxsNum">
|
|
<el-form-item label="经销商名称" prop="jxsNum">
|
|
- <el-select v-model="mainForm.jxsNum" placeholder="选择经销商" size="small" filterable clearable style="width: 100%" @change="changeDealer" :disabled="listItem != undefined">
|
|
|
|
|
|
+ <el-select v-model="mainForm.jxsNum" placeholder="选择经销商" size="small" filterable clearable style="width: 100%" :disabled="listItem != undefined" @change="changeDealer">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in dealerList"
|
|
v-for="item in dealerList"
|
|
:key="item.number"
|
|
:key="item.number"
|
|
:label="item.name"
|
|
:label="item.name"
|
|
- :value="item.number">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ :value="item.number"
|
|
|
|
+ />
|
|
</el-select>
|
|
</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="company">
|
|
<el-form-item label="使用单位" prop="company">
|
|
- <el-input v-model="mainForm.company" placeholder="请输入使用单位"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.company" placeholder="请输入使用单位" />
|
|
</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">
|
|
@@ -88,19 +90,21 @@
|
|
<el-select v-model="mainForm.tradeCategory" placeholder="选择行业类别" size="small" clearable style="width: 100%">
|
|
<el-select v-model="mainForm.tradeCategory" placeholder="选择行业类别" size="small" clearable style="width: 100%">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in tradeCategoryList"
|
|
v-for="item in tradeCategoryList"
|
|
- :key="item.value" :label="item.label" :value="item.value">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ />
|
|
</el-select>
|
|
</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="enginNum">
|
|
<el-form-item label="工程编号" prop="enginNum">
|
|
- <el-input v-model="mainForm.enginNum" placeholder="请输入工程编号"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.enginNum" placeholder="请输入工程编号" />
|
|
</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="factoryNum">
|
|
<el-form-item label="厂工程编码" prop="factoryNum">
|
|
- <el-input v-model="mainForm.factoryNum" placeholder="请输入厂工程编码"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.factoryNum" placeholder="请输入厂工程编码" />
|
|
</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">
|
|
@@ -108,64 +112,68 @@
|
|
<el-select v-model="mainForm.loginType" placeholder="选择工程登录类型" size="small" clearable style="width: 100%">
|
|
<el-select v-model="mainForm.loginType" placeholder="选择工程登录类型" size="small" clearable style="width: 100%">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in loginTypeList"
|
|
v-for="item in loginTypeList"
|
|
- :key="item.dictCode" :label="item.dictValue" :value="item.dictCode">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ :key="item.dictCode"
|
|
|
|
+ :label="item.dictValue"
|
|
|
|
+ :value="item.dictCode"
|
|
|
|
+ />
|
|
</el-select>
|
|
</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="linkman">
|
|
<el-form-item label="联系人" prop="linkman">
|
|
- <el-input v-model="mainForm.linkman" placeholder="请输入联系人"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.linkman" placeholder="请输入联系人" />
|
|
</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="phone">
|
|
<el-form-item label="联系电话" prop="phone">
|
|
- <el-input v-model="mainForm.phone" placeholder="请输入联系电话"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.phone" placeholder="请输入联系电话" />
|
|
</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="tel">
|
|
<el-form-item label="固定电话" prop="tel">
|
|
- <el-input v-model="mainForm.tel" placeholder="请输入固定电话"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.tel" placeholder="请输入固定电话" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="16" :lg="16">
|
|
<el-col :xs="24" :sm="16" :lg="16">
|
|
<el-form-item label="安装地址" prop="address">
|
|
<el-form-item label="安装地址" prop="address">
|
|
- <el-input v-model="mainForm.address" placeholder="请输入安装地址"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.address" placeholder="请输入安装地址" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="8" :lg="8">
|
|
<el-col :xs="24" :sm="8" :lg="8">
|
|
<el-form-item label="文件编号" prop="fileNo">
|
|
<el-form-item label="文件编号" prop="fileNo">
|
|
- <el-input v-model="mainForm.fileNo" placeholder="请输入文件编号"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.fileNo" placeholder="请输入文件编号" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :xs="24" :sm="24" :lg="16" v-if="!isDealer">
|
|
|
|
|
|
+ <el-col v-if="!isDealer" :xs="24" :sm="24" :lg="16">
|
|
<el-form-item label="格力内部备注" prop="greeRemark">
|
|
<el-form-item label="格力内部备注" prop="greeRemark">
|
|
- <el-input v-model="mainForm.greeRemark" placeholder="请输入格力内部备注"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.greeRemark" placeholder="请输入格力内部备注" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :xs="24" :sm="12" :lg="8" v-if="!isDealer">
|
|
|
|
|
|
+ <el-col v-if="!isDealer" :xs="24" :sm="12" :lg="8">
|
|
<el-form-item label="权限分类" prop="power">
|
|
<el-form-item label="权限分类" prop="power">
|
|
<el-select v-model="mainForm.power" placeholder="选择权限分类" size="small" clearable style="width: 100%">
|
|
<el-select v-model="mainForm.power" placeholder="选择权限分类" size="small" clearable style="width: 100%">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in powerList"
|
|
v-for="item in powerList"
|
|
- :key="item.dictCode" :label="item.dictValue" :value="item.dictCode">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ :key="item.dictCode"
|
|
|
|
+ :label="item.dictValue"
|
|
|
|
+ :value="item.dictCode"
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
<el-form-item label="格力回复" prop="greeReply">
|
|
<el-form-item label="格力回复" prop="greeReply">
|
|
- <el-input v-model="mainForm.greeReply" :placeholder="isDealer ? '' : '请输入格力回复'" :disabled="isDealer"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.greeReply" :placeholder="isDealer ? '' : '请输入格力回复'" :disabled="isDealer" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
<el-form-item label="备注" prop="remark">
|
|
<el-form-item label="备注" prop="remark">
|
|
- <el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.remark" placeholder="请输入备注" />
|
|
</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="createMan">
|
|
<el-form-item label="制单人" prop="createMan">
|
|
- <el-input v-model="mainForm.createMan" placeholder="请输入制单人" disabled></el-input>
|
|
|
|
|
|
+ <el-input v-model="mainForm.createMan" placeholder="请输入制单人" disabled />
|
|
</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;">
|
|
@@ -176,8 +184,8 @@
|
|
disabled
|
|
disabled
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
- placeholder="选择日期">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ placeholder="选择日期"
|
|
|
|
+ />
|
|
</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;">
|
|
@@ -187,8 +195,8 @@
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
- placeholder="选择日期">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ placeholder="选择日期"
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -198,7 +206,7 @@
|
|
<div class="title">货品信息</div>
|
|
<div class="title">货品信息</div>
|
|
<div>
|
|
<div>
|
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="openDialog">添加货品</el-button>
|
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="openDialog">添加货品</el-button>
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
|
|
|
+ <el-divider direction="vertical" />
|
|
<!-- <ImportButton :imUrl="'engin-info-order/import-item'" @importSuccess="getImportList" :isIcon="false" style="display: inline-block" />
|
|
<!-- <ImportButton :imUrl="'engin-info-order/import-item'" @importSuccess="getImportList" :isIcon="false" style="display: inline-block" />
|
|
<ExportButton :exUrl="'engin-info-order/download'" :exParams="{}" :exText="'下载导入模版'" :isIcon="false" style="display: inline-block" /> -->
|
|
<ExportButton :exUrl="'engin-info-order/download'" :exParams="{}" :exText="'下载导入模版'" :isIcon="false" style="display: inline-block" /> -->
|
|
</div>
|
|
</div>
|
|
@@ -206,49 +214,49 @@
|
|
|
|
|
|
<div class="table" style="margin-top: 20px">
|
|
<div class="table" style="margin-top: 20px">
|
|
<el-table :data="goodsList" 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 align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip>
|
|
<el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-select v-model="scope.row.saleTypeId" placeholder="选择销售类型" size="mini" clearable style="width: 100%" @change="changeSaleType(scope.$index)" v-if="listItem">
|
|
|
|
- <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
|
|
|
|
|
|
+ <el-select v-if="listItem" v-model="scope.row.saleTypeId" placeholder="选择销售类型" size="mini" clearable style="width: 100%" @change="changeSaleType(scope.$index)">
|
|
|
|
+ <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
- <div v-else>{{scope.row.saleTypeName}}</div>
|
|
|
|
|
|
+ <div v-else>{{ scope.row.saleTypeName }}</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</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="materialOldNumber" min-width="120" show-overflow-tooltip></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="materialNumber" min-width="120" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
|
|
<el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
|
|
<el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-model="scope.row.specification" size="mini" v-if="listItem"></el-input>
|
|
|
|
- <div v-else>{{scope.row.specification}}</div>
|
|
|
|
|
|
+ <el-input v-if="listItem" v-model="scope.row.specification" size="mini" />
|
|
|
|
+ <div v-else>{{ scope.row.specification }}</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
|
|
<el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip>
|
|
<el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent ></el-input>
|
|
|
|
|
|
+ <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
|
|
<el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent ></el-input>
|
|
|
|
|
|
+ <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="center" label="订单金额" min-width="100" show-overflow-tooltip>
|
|
<el-table-column align="center" label="订单金额" min-width="100" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{(scope.row.price || 0) * (scope.row.qty || 0)}}
|
|
|
|
|
|
+ {{ (scope.row.price || 0) * (scope.row.qty || 0) }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip>
|
|
<el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-model="scope.row.remark" size="small"></el-input>
|
|
|
|
|
|
+ <el-input v-model="scope.row.remark" size="small" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</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="税率" prop="taxRate" min-width="100" show-overflow-tooltip />
|
|
<el-table-column align="center" label="操作" width="100" fixed="right">
|
|
<el-table-column align="center" label="操作" width="100" fixed="right">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>
|
|
|
|
|
|
+ <el-button v-if="!listItem && !scope.row.id" type="text" @click="deleteItem(scope.$index)">删除</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -257,8 +265,8 @@
|
|
<div class="page-footer">
|
|
<div class="page-footer">
|
|
<div class="footer">
|
|
<div class="footer">
|
|
<el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
|
|
<el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
|
|
-<!-- <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>-->
|
|
|
|
- <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
|
|
|
|
|
|
+ <!-- <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>-->
|
|
|
|
+ <el-popconfirm title="确定关闭吗?" style="margin-left: 10px;" @onConfirm="goBack">
|
|
<el-button slot="reference">返回列表</el-button>
|
|
<el-button slot="reference">返回列表</el-button>
|
|
</el-popconfirm>
|
|
</el-popconfirm>
|
|
</div>
|
|
</div>
|
|
@@ -270,30 +278,30 @@
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
<el-form-item prop="salesType">
|
|
<el-form-item prop="salesType">
|
|
<el-select v-model="goodsScreenForm.salesType" placeholder="选择销售类型" style="width: 100%" clearable>
|
|
<el-select v-model="goodsScreenForm.salesType" placeholder="选择销售类型" style="width: 100%" clearable>
|
|
- <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
|
|
|
|
|
|
+ <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
<el-form-item prop="proNum">
|
|
<el-form-item prop="proNum">
|
|
- <el-input v-model="goodsScreenForm.proNum" placeholder="请输入产品编码"></el-input>
|
|
|
|
|
|
+ <el-input v-model="goodsScreenForm.proNum" placeholder="请输入产品编码" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
<el-form-item prop="proName">
|
|
<el-form-item prop="proName">
|
|
- <el-input v-model="goodsScreenForm.proName" placeholder="请输入产品名称"></el-input>
|
|
|
|
|
|
+ <el-input v-model="goodsScreenForm.proName" placeholder="请输入产品名称" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
<el-form-item prop="proModel">
|
|
<el-form-item prop="proModel">
|
|
- <el-input v-model="goodsScreenForm.proModel" placeholder="请输入产品型号"></el-input>
|
|
|
|
|
|
+ <el-input v-model="goodsScreenForm.proModel" placeholder="请输入产品型号" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
- <el-form-item prop="price1" style="display: flex">
|
|
|
|
- <el-input v-model="goodsScreenForm.price1" placeholder="请输入价格" style="width: 46%"></el-input>
|
|
|
|
|
|
+ <el-form-item prop="price1" style="display: flex">
|
|
|
|
+ <el-input v-model="goodsScreenForm.price1" placeholder="请输入价格" style="width: 46%" />
|
|
<span> - </span>
|
|
<span> - </span>
|
|
- <el-input v-model="goodsScreenForm.price2" placeholder="请输入价格" style="width: 46%"></el-input>
|
|
|
|
|
|
+ <el-input v-model="goodsScreenForm.price2" placeholder="请输入价格" style="width: 46%" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="12" :sm="18" :lg="18" class="tr">
|
|
<el-col :xs="12" :sm="18" :lg="18" class="tr">
|
|
@@ -308,23 +316,23 @@
|
|
<div class="tables">
|
|
<div class="tables">
|
|
<div class="table">
|
|
<div class="table">
|
|
<el-table :data="leftGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="leftSelectionChange">
|
|
<el-table :data="leftGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="leftSelectionChange">
|
|
- <el-table-column align="center" type="selection" width="55" :selectable='checkboxSelect'></el-table-column>
|
|
|
|
- <el-table-column align="center" label="销售类型" prop="saleName" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="center" type="selection" width="55" :selectable="checkboxSelect" />
|
|
|
|
+ <el-table-column align="center" label="销售类型" prop="saleName" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip />
|
|
</el-table>
|
|
</el-table>
|
|
<div class="pagination clearfix" style="margin-top: 10px">
|
|
<div class="pagination clearfix" style="margin-top: 10px">
|
|
<div class="fr">
|
|
<div class="fr">
|
|
<el-pagination
|
|
<el-pagination
|
|
- @current-change="handleTableCurrentChange"
|
|
|
|
:current-page="currentPage"
|
|
:current-page="currentPage"
|
|
:page-size="10"
|
|
:page-size="10"
|
|
background
|
|
background
|
|
layout="prev, pager, next"
|
|
layout="prev, pager, next"
|
|
- :total="listTotal">
|
|
|
|
- </el-pagination>
|
|
|
|
|
|
+ :total="listTotal"
|
|
|
|
+ @current-change="handleTableCurrentChange"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -336,18 +344,17 @@
|
|
</div>
|
|
</div>
|
|
<div class="table">
|
|
<div class="table">
|
|
<el-table :data="rightGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="rightSelectionChange">
|
|
<el-table :data="rightGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="rightSelectionChange">
|
|
- <el-table-column align="center" type="selection" width="55"></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" prop="saleName" label="销售类型" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="center" type="selection" width="55" />
|
|
|
|
+ <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" prop="saleName" label="销售类型" show-overflow-tooltip />
|
|
|
|
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="closeDialog">取 消</el-button>
|
|
<el-button @click="closeDialog">取 消</el-button>
|
|
<el-button type="primary" @click="submitAddGoods">确 定</el-button>
|
|
<el-button type="primary" @click="submitAddGoods">确 定</el-button>
|
|
@@ -358,7 +365,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getEnginDetail, getRetailProductList, addEngin, editEngin, submitEngin } from "@/api/supply/engin";
|
|
|
|
|
|
+import { getEnginDetail, getRetailProductList, addEngin, editEngin, submitEngin } from '@/api/supply/engin'
|
|
import { getDictList, getTypeList, getSalesmanList, getDealerList } from '@/api/common'
|
|
import { getDictList, getTypeList, getSalesmanList, getDealerList } from '@/api/common'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -394,7 +401,7 @@ export default {
|
|
power: '',
|
|
power: '',
|
|
greeRemark: '',
|
|
greeRemark: '',
|
|
greeReply: '',
|
|
greeReply: '',
|
|
- fileNo: '',
|
|
|
|
|
|
+ fileNo: ''
|
|
},
|
|
},
|
|
mainFormRules: {
|
|
mainFormRules: {
|
|
salesMan: [{ required: true, message: '请选择业务员', trigger: 'change' }],
|
|
salesMan: [{ required: true, message: '请选择业务员', trigger: 'change' }],
|
|
@@ -405,23 +412,23 @@ export default {
|
|
address: [{ required: true, message: '请输入安装地址', trigger: 'blur' }],
|
|
address: [{ required: true, message: '请输入安装地址', trigger: 'blur' }],
|
|
enginNum: [{ required: true, message: '请输入工程编号', trigger: 'blur' }],
|
|
enginNum: [{ required: true, message: '请输入工程编号', trigger: 'blur' }],
|
|
loginType: [{ required: true, message: '请输入工程登录类型', trigger: 'blur' }],
|
|
loginType: [{ required: true, message: '请输入工程登录类型', trigger: 'blur' }],
|
|
- tradeCategory: [{ required: true, message: '请选择行业类别', trigger: 'change' }],
|
|
|
|
|
|
+ tradeCategory: [{ required: true, message: '请选择行业类别', trigger: 'change' }]
|
|
},
|
|
},
|
|
loginTypeList: [],
|
|
loginTypeList: [],
|
|
powerList: [],
|
|
powerList: [],
|
|
machineTypeList: [],
|
|
machineTypeList: [],
|
|
tradeCategoryList: [
|
|
tradeCategoryList: [
|
|
- {value: '房地产', label: '房地产'},
|
|
|
|
- {value: '公共建筑', label: '公共建筑'},
|
|
|
|
- {value: '工业制造', label: '工业制造'},
|
|
|
|
- {value: '商业项目', label: '商业项目'},
|
|
|
|
- {value: '采暖及清洁能源', label: '采暖及清洁能源'},
|
|
|
|
- {value: '轨道交通', label: '轨道交通'},
|
|
|
|
- {value: '数据通讯', label: '数据通讯'},
|
|
|
|
- {value: '冷冻冷藏', label: '冷冻冷藏'},
|
|
|
|
- {value: '高端制造', label: '高端制造'},
|
|
|
|
- {value: '医院医疗', label: '医院医疗'},
|
|
|
|
- {value: '其他', label: '其他'},
|
|
|
|
|
|
+ { value: '房地产', label: '房地产' },
|
|
|
|
+ { value: '公共建筑', label: '公共建筑' },
|
|
|
|
+ { value: '工业制造', label: '工业制造' },
|
|
|
|
+ { value: '商业项目', label: '商业项目' },
|
|
|
|
+ { value: '采暖及清洁能源', label: '采暖及清洁能源' },
|
|
|
|
+ { value: '轨道交通', label: '轨道交通' },
|
|
|
|
+ { value: '数据通讯', label: '数据通讯' },
|
|
|
|
+ { value: '冷冻冷藏', label: '冷冻冷藏' },
|
|
|
|
+ { value: '高端制造', label: '高端制造' },
|
|
|
|
+ { value: '医院医疗', label: '医院医疗' },
|
|
|
|
+ { value: '其他', label: '其他' }
|
|
],
|
|
],
|
|
|
|
|
|
typeList: [],
|
|
typeList: [],
|
|
@@ -436,7 +443,7 @@ export default {
|
|
proModel: '',
|
|
proModel: '',
|
|
price1: '',
|
|
price1: '',
|
|
price2: '',
|
|
price2: '',
|
|
- salesType: '',
|
|
|
|
|
|
+ salesType: ''
|
|
},
|
|
},
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
listTotal: 0,
|
|
listTotal: 0,
|
|
@@ -445,88 +452,88 @@ export default {
|
|
rightGoodsList: [],
|
|
rightGoodsList: [],
|
|
|
|
|
|
leftSelection: [],
|
|
leftSelection: [],
|
|
- rightSelection: [],
|
|
|
|
|
|
+ rightSelection: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
computed: {
|
|
computed: {
|
|
isDealer() {
|
|
isDealer() {
|
|
- return JSON.parse(localStorage.getItem("supply_user")).isCustomer
|
|
|
|
- },
|
|
|
|
|
|
+ return JSON.parse(localStorage.getItem('supply_user')).isCustomer
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
async created() {
|
|
async created() {
|
|
- await this.getSalesmanList();
|
|
|
|
- this.getDictList();
|
|
|
|
- this.getTypeList();
|
|
|
|
- this.getDealerList();
|
|
|
|
- if(this.listItem) {
|
|
|
|
- this.getDetail();
|
|
|
|
- }else {
|
|
|
|
- this.mainForm.jxsNum = JSON.parse(localStorage.getItem("supply_user")).customerNumber;
|
|
|
|
- this.mainForm.jxsName = JSON.parse(localStorage.getItem("supply_user")).customerName;
|
|
|
|
- this.mainForm.createMan = JSON.parse(localStorage.getItem("supply_user")).nickName;
|
|
|
|
- this.mainForm.createDate = this.getDate(0);
|
|
|
|
- this.mainForm.contractDate = this.getDate(1);
|
|
|
|
|
|
+ await this.getSalesmanList()
|
|
|
|
+ this.getDictList()
|
|
|
|
+ this.getTypeList()
|
|
|
|
+ this.getDealerList()
|
|
|
|
+ if (this.listItem) {
|
|
|
|
+ this.getDetail()
|
|
|
|
+ } else {
|
|
|
|
+ this.mainForm.jxsNum = JSON.parse(localStorage.getItem('supply_user')).customerNumber
|
|
|
|
+ this.mainForm.jxsName = JSON.parse(localStorage.getItem('supply_user')).customerName
|
|
|
|
+ this.mainForm.createMan = JSON.parse(localStorage.getItem('supply_user')).nickName
|
|
|
|
+ this.mainForm.createDate = this.getDate(0)
|
|
|
|
+ this.mainForm.contractDate = this.getDate(1)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
// 返回列表
|
|
// 返回列表
|
|
goBack() {
|
|
goBack() {
|
|
- this.$emit('backListFormDetail');
|
|
|
|
|
|
+ this.$emit('backListFormDetail')
|
|
},
|
|
},
|
|
|
|
|
|
getDate(addYear) {
|
|
getDate(addYear) {
|
|
- var date = new Date();
|
|
|
|
- var seperator1 = "-";
|
|
|
|
- var year = date.getFullYear() + addYear;
|
|
|
|
- var month = date.getMonth() + 1;
|
|
|
|
- var strDate = date.getDate();
|
|
|
|
|
|
+ var date = new Date()
|
|
|
|
+ var seperator1 = '-'
|
|
|
|
+ var year = date.getFullYear() + addYear
|
|
|
|
+ var month = date.getMonth() + 1
|
|
|
|
+ var strDate = date.getDate()
|
|
if (month >= 1 && month <= 9) {
|
|
if (month >= 1 && month <= 9) {
|
|
- month = "0" + month;
|
|
|
|
|
|
+ month = '0' + month
|
|
}
|
|
}
|
|
if (strDate >= 0 && strDate <= 9) {
|
|
if (strDate >= 0 && strDate <= 9) {
|
|
- strDate = "0" + strDate;
|
|
|
|
|
|
+ strDate = '0' + strDate
|
|
}
|
|
}
|
|
- var currentdate = year + seperator1 + month + seperator1 + strDate;
|
|
|
|
- return currentdate;
|
|
|
|
|
|
+ var currentdate = year + seperator1 + month + seperator1 + strDate
|
|
|
|
+ return currentdate
|
|
},
|
|
},
|
|
|
|
|
|
// 获取详情
|
|
// 获取详情
|
|
getDetail() {
|
|
getDetail() {
|
|
- getEnginDetail({id: this.listItem.enginInfoId}).then(res => {
|
|
|
|
- let data = res.data;
|
|
|
|
- this.mainForm.orderNum = data.enginInfoNo;
|
|
|
|
- this.mainForm.orderDate = data.orderDate;
|
|
|
|
|
|
+ getEnginDetail({ id: this.listItem.enginInfoId }).then(res => {
|
|
|
|
+ const data = res.data
|
|
|
|
+ this.mainForm.orderNum = data.enginInfoNo
|
|
|
|
+ this.mainForm.orderDate = data.orderDate
|
|
// this.mainForm.mainId = data.productCategoryId;
|
|
// this.mainForm.mainId = data.productCategoryId;
|
|
- this.mainForm.jxsNum = data.customerNumber;
|
|
|
|
- this.mainForm.enginName = data.projectName;
|
|
|
|
- this.mainForm.machineType = data.machineType;
|
|
|
|
- this.mainForm.jxsName = data.customerName;
|
|
|
|
- this.mainForm.company = data.useUnit;
|
|
|
|
- this.mainForm.tradeCategory = data.tradeCategory;
|
|
|
|
- this.mainForm.address = data.installAddress;
|
|
|
|
- this.mainForm.enginNum = data.projectNo;
|
|
|
|
- this.mainForm.factoryNum = data.enginFactoryNo;
|
|
|
|
- this.mainForm.loginType = data.enginSignType;
|
|
|
|
- this.mainForm.linkman = data.linkman;
|
|
|
|
- this.mainForm.phone = data.phone;
|
|
|
|
- this.mainForm.tel = data.tel;
|
|
|
|
- this.mainForm.remark = data.remark;
|
|
|
|
- this.mainForm.salesMan = data.serviceId;
|
|
|
|
- this.mainForm.createMan = data.createName;
|
|
|
|
- this.mainForm.createDate = data.createTime;
|
|
|
|
- this.mainForm.contractDate = data.contractExpireDate;
|
|
|
|
- this.mainForm.power = data.powerCategory;
|
|
|
|
- this.mainForm.greeRemark = data.geLiInerNote;
|
|
|
|
- this.mainForm.greeReply = data.geLiNote;
|
|
|
|
- this.mainForm.fileNo = data.fileNo;
|
|
|
|
|
|
+ this.mainForm.jxsNum = data.customerNumber
|
|
|
|
+ this.mainForm.enginName = data.projectName
|
|
|
|
+ this.mainForm.machineType = data.machineType
|
|
|
|
+ this.mainForm.jxsName = data.customerName
|
|
|
|
+ this.mainForm.company = data.useUnit
|
|
|
|
+ this.mainForm.tradeCategory = data.tradeCategory
|
|
|
|
+ this.mainForm.address = data.installAddress
|
|
|
|
+ this.mainForm.enginNum = data.projectNo
|
|
|
|
+ this.mainForm.factoryNum = data.enginFactoryNo
|
|
|
|
+ this.mainForm.loginType = data.enginSignType
|
|
|
|
+ this.mainForm.linkman = data.linkman
|
|
|
|
+ this.mainForm.phone = data.phone
|
|
|
|
+ this.mainForm.tel = data.tel
|
|
|
|
+ this.mainForm.remark = data.remark
|
|
|
|
+ this.mainForm.salesMan = data.serviceId
|
|
|
|
+ this.mainForm.createMan = data.createName
|
|
|
|
+ this.mainForm.createDate = data.createTime
|
|
|
|
+ this.mainForm.contractDate = data.contractExpireDate
|
|
|
|
+ this.mainForm.power = data.powerCategory
|
|
|
|
+ this.mainForm.greeRemark = data.geLiInerNote
|
|
|
|
+ this.mainForm.greeReply = data.geLiNote
|
|
|
|
+ this.mainForm.fileNo = data.fileNo
|
|
|
|
|
|
data.items.forEach(item => {
|
|
data.items.forEach(item => {
|
|
- item.cantDel = true;
|
|
|
|
|
|
+ item.cantDel = true
|
|
})
|
|
})
|
|
- this.goodsList = data.items;
|
|
|
|
|
|
+ this.goodsList = data.items
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -534,26 +541,26 @@ export default {
|
|
getDealerList() {
|
|
getDealerList() {
|
|
getDealerList({
|
|
getDealerList({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
- pageSize: -1,
|
|
|
|
|
|
+ pageSize: -1
|
|
// bindUser: false
|
|
// bindUser: false
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- this.dealerList = res.data.records;
|
|
|
|
|
|
+ this.dealerList = res.data.records
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
// 获取产品大类列表
|
|
// 获取产品大类列表
|
|
getDictList() {
|
|
getDictList() {
|
|
- getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
|
|
|
|
- this.typeList = res.data;
|
|
|
|
|
|
+ getDictList({ sysDictEnum: 'PRODUCT_TYPE' }).then(res => {
|
|
|
|
+ this.typeList = res.data
|
|
})
|
|
})
|
|
- getDictList({sysDictEnum: 'MACHINE_TYPE'}).then(res => {
|
|
|
|
- this.machineTypeList = res.data;
|
|
|
|
|
|
+ getDictList({ sysDictEnum: 'MACHINE_TYPE' }).then(res => {
|
|
|
|
+ this.machineTypeList = res.data
|
|
})
|
|
})
|
|
- getDictList({sysDictEnum: 'POWER_CATEGORY'}).then(res => {
|
|
|
|
- this.powerList = res.data;
|
|
|
|
|
|
+ getDictList({ sysDictEnum: 'POWER_CATEGORY' }).then(res => {
|
|
|
|
+ this.powerList = res.data
|
|
})
|
|
})
|
|
- getDictList({sysDictEnum: 'SIGN_TYPE'}).then(res => {
|
|
|
|
- this.loginTypeList = res.data;
|
|
|
|
|
|
+ getDictList({ sysDictEnum: 'SIGN_TYPE' }).then(res => {
|
|
|
|
+ this.loginTypeList = res.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -561,10 +568,10 @@ export default {
|
|
getTypeList() {
|
|
getTypeList() {
|
|
getTypeList({
|
|
getTypeList({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
- pageSize: -1,
|
|
|
|
|
|
+ pageSize: -1
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- this.salesTypeList = res.data.records;
|
|
|
|
- });
|
|
|
|
|
|
+ this.salesTypeList = res.data.records
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
async getSalesmanList() {
|
|
async getSalesmanList() {
|
|
@@ -572,30 +579,30 @@ export default {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: -1,
|
|
pageSize: -1,
|
|
isCustomer: 0,
|
|
isCustomer: 0,
|
|
- status: true,
|
|
|
|
- });
|
|
|
|
- this.salesmanList = res.data.records;
|
|
|
|
|
|
+ status: true
|
|
|
|
+ })
|
|
|
|
+ this.salesmanList = res.data.records
|
|
},
|
|
},
|
|
|
|
|
|
changeDealer() {
|
|
changeDealer() {
|
|
- if(this.mainForm.jxsNum) {
|
|
|
|
- let jxsItem = this.dealerList.find(o => o.number == this.mainForm.jxsNum);
|
|
|
|
- this.mainForm.jxsName = jxsItem.name;
|
|
|
|
- this.mainForm.jxsId = jxsItem.id;
|
|
|
|
- }else {
|
|
|
|
- this.mainForm.jxsName = '';
|
|
|
|
- this.mainForm.jxsId = '';
|
|
|
|
|
|
+ if (this.mainForm.jxsNum) {
|
|
|
|
+ const jxsItem = this.dealerList.find(o => o.number == this.mainForm.jxsNum)
|
|
|
|
+ this.mainForm.jxsName = jxsItem.name
|
|
|
|
+ this.mainForm.jxsId = jxsItem.id
|
|
|
|
+ } else {
|
|
|
|
+ this.mainForm.jxsName = ''
|
|
|
|
+ this.mainForm.jxsId = ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
changeSaleType(index) {
|
|
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;
|
|
|
|
- }else {
|
|
|
|
- this.goodsList[index].saleTypeName = '';
|
|
|
|
- this.goodsList[index].saleTypeCode = '';
|
|
|
|
|
|
+ if (this.goodsList[index].saleTypeId) {
|
|
|
|
+ const obj = this.salesTypeList.find(o => o.id == this.goodsList[index].saleTypeId)
|
|
|
|
+ this.goodsList[index].saleTypeName = obj.saleName
|
|
|
|
+ this.goodsList[index].saleTypeCode = obj.saleCode
|
|
|
|
+ } else {
|
|
|
|
+ this.goodsList[index].saleTypeName = ''
|
|
|
|
+ this.goodsList[index].saleTypeCode = ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -610,38 +617,38 @@ export default {
|
|
specification: this.goodsScreenForm.proModel,
|
|
specification: this.goodsScreenForm.proModel,
|
|
price1: this.goodsScreenForm.price1,
|
|
price1: this.goodsScreenForm.price1,
|
|
price2: this.goodsScreenForm.price2,
|
|
price2: this.goodsScreenForm.price2,
|
|
- customerId:this.listItem ?this.listItem.customerId :'' ,
|
|
|
|
|
|
+ customerId: this.listItem ? this.listItem.customerId : ''
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- let oldGoodsList = this.goodsList;
|
|
|
|
- let newGoodsList = res.data.records;
|
|
|
|
- for(let i = 0; i < oldGoodsList.length; i++) {
|
|
|
|
- let oldItem = oldGoodsList[i]
|
|
|
|
- for(let j = 0; j < newGoodsList.length; j++) {
|
|
|
|
- let newItem = newGoodsList[j]
|
|
|
|
- if(newItem.id === oldItem.id){
|
|
|
|
- newGoodsList[j].selected = true;
|
|
|
|
- break;
|
|
|
|
|
|
+ const oldGoodsList = this.goodsList
|
|
|
|
+ const newGoodsList = res.data.records
|
|
|
|
+ for (let i = 0; i < oldGoodsList.length; i++) {
|
|
|
|
+ const oldItem = oldGoodsList[i]
|
|
|
|
+ for (let j = 0; j < newGoodsList.length; j++) {
|
|
|
|
+ const newItem = newGoodsList[j]
|
|
|
|
+ if (newItem.id === oldItem.id) {
|
|
|
|
+ newGoodsList[j].selected = true
|
|
|
|
+ break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
res.data.records.forEach(item => {
|
|
res.data.records.forEach(item => {
|
|
- item.materialName = item.name;
|
|
|
|
- item.materialCode = item.number;
|
|
|
|
- item.saleTypeName = item.saleName;
|
|
|
|
- item.unit = item.baseUnit;
|
|
|
|
- item.price = item.batchPrice;
|
|
|
|
- item.tax = item.taxRate;
|
|
|
|
- item.isDirectTransfer = false;
|
|
|
|
- item.directTransferQty = '';
|
|
|
|
- item.status1 = '';
|
|
|
|
- item.status2 = '';
|
|
|
|
- item.rebateAmount = '';
|
|
|
|
- item.rebateRate = '';
|
|
|
|
- item.productPriceId = item.id;
|
|
|
|
|
|
+ item.materialName = item.name
|
|
|
|
+ item.materialCode = item.number
|
|
|
|
+ item.saleTypeName = item.saleName
|
|
|
|
+ item.unit = item.baseUnit
|
|
|
|
+ item.price = item.batchPrice
|
|
|
|
+ item.tax = item.taxRate
|
|
|
|
+ item.isDirectTransfer = false
|
|
|
|
+ item.directTransferQty = ''
|
|
|
|
+ item.status1 = ''
|
|
|
|
+ item.status2 = ''
|
|
|
|
+ item.rebateAmount = ''
|
|
|
|
+ item.rebateRate = ''
|
|
|
|
+ item.productPriceId = item.id
|
|
// item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : '';
|
|
// item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : '';
|
|
- });
|
|
|
|
- this.leftGoodsList = res.data.records;
|
|
|
|
- this.listTotal = res.data.total;
|
|
|
|
|
|
+ })
|
|
|
|
+ this.leftGoodsList = res.data.records
|
|
|
|
+ this.listTotal = res.data.total
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -649,87 +656,87 @@ export default {
|
|
checkboxSelect(row, rowIndex) {
|
|
checkboxSelect(row, rowIndex) {
|
|
if (row.selected) {
|
|
if (row.selected) {
|
|
return false // 禁用
|
|
return false // 禁用
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
return true // 不禁用
|
|
return true // 不禁用
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
// 点击 选择商品
|
|
// 点击 选择商品
|
|
openDialog() {
|
|
openDialog() {
|
|
- this.isShowGoodsDialog = true;
|
|
|
|
- this.getGoodsList();
|
|
|
|
|
|
+ this.isShowGoodsDialog = true
|
|
|
|
+ this.getGoodsList()
|
|
},
|
|
},
|
|
|
|
|
|
// 提交筛选表单
|
|
// 提交筛选表单
|
|
submitGoodsScreenForm() {
|
|
submitGoodsScreenForm() {
|
|
- this.currentPage = 1;
|
|
|
|
- this.getGoodsList();
|
|
|
|
|
|
+ this.currentPage = 1
|
|
|
|
+ this.getGoodsList()
|
|
},
|
|
},
|
|
|
|
|
|
// 重置筛选表单
|
|
// 重置筛选表单
|
|
resetGoodsScreenForm() {
|
|
resetGoodsScreenForm() {
|
|
- this.$refs.goodsScreenForm.resetFields();
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.getGoodsList();
|
|
|
|
|
|
+ this.$refs.goodsScreenForm.resetFields()
|
|
|
|
+ this.currentPage = 1
|
|
|
|
+ this.getGoodsList()
|
|
},
|
|
},
|
|
|
|
|
|
// 更改列表当前页
|
|
// 更改列表当前页
|
|
handleTableCurrentChange(val) {
|
|
handleTableCurrentChange(val) {
|
|
- this.currentPage = val;
|
|
|
|
- this.getGoodsList();
|
|
|
|
|
|
+ this.currentPage = val
|
|
|
|
+ this.getGoodsList()
|
|
},
|
|
},
|
|
|
|
|
|
// 关闭 弹窗
|
|
// 关闭 弹窗
|
|
closeDialog() {
|
|
closeDialog() {
|
|
- this.isShowGoodsDialog = false;
|
|
|
|
|
|
+ this.isShowGoodsDialog = false
|
|
},
|
|
},
|
|
|
|
|
|
// 左侧列表选择
|
|
// 左侧列表选择
|
|
leftSelectionChange(val) {
|
|
leftSelectionChange(val) {
|
|
- this.leftSelection = val;
|
|
|
|
|
|
+ this.leftSelection = val
|
|
},
|
|
},
|
|
|
|
|
|
// 右侧列表选择
|
|
// 右侧列表选择
|
|
rightSelectionChange(val) {
|
|
rightSelectionChange(val) {
|
|
- this.rightSelection = val;
|
|
|
|
|
|
+ this.rightSelection = val
|
|
},
|
|
},
|
|
|
|
|
|
// 数组去重
|
|
// 数组去重
|
|
delRepeat(arr1, arr2) {
|
|
delRepeat(arr1, arr2) {
|
|
- let allArr = arr1.concat(arr2); // 两个数组对象合并
|
|
|
|
- let newArr = []; // 存放去重后数据的新数组
|
|
|
|
- for(let i=0; i<allArr.length; i++){ // 循环allArr数组对象的内容
|
|
|
|
- let flag = true; // 建立标记,判断数据是否重复,true为不重复
|
|
|
|
- for(let j=0; j<newArr.length; j++){ // 循环新数组的内容
|
|
|
|
- if(allArr[i].id == newArr[j].id){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
|
|
|
|
- flag = false;
|
|
|
|
|
|
+ const allArr = arr1.concat(arr2) // 两个数组对象合并
|
|
|
|
+ const newArr = [] // 存放去重后数据的新数组
|
|
|
|
+ for (let i = 0; i < allArr.length; i++) { // 循环allArr数组对象的内容
|
|
|
|
+ let flag = true // 建立标记,判断数据是否重复,true为不重复
|
|
|
|
+ for (let j = 0; j < newArr.length; j++) { // 循环新数组的内容
|
|
|
|
+ if (allArr[i].id == newArr[j].id) { // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
|
|
|
|
+ flag = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(flag){ // 判断是否重复
|
|
|
|
- newArr.push(allArr[i]); // 不重复的放入新数组。 新数组的内容会继续进行上边的循环。
|
|
|
|
|
|
+ if (flag) { // 判断是否重复
|
|
|
|
+ newArr.push(allArr[i]) // 不重复的放入新数组。 新数组的内容会继续进行上边的循环。
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return newArr;
|
|
|
|
|
|
+ return newArr
|
|
},
|
|
},
|
|
|
|
|
|
// 全部添加
|
|
// 全部添加
|
|
addAllGoods() {
|
|
addAllGoods() {
|
|
- this.rightGoodsList = this.delRepeat(this.leftGoodsList, this.rightGoodsList);
|
|
|
|
|
|
+ this.rightGoodsList = this.delRepeat(this.leftGoodsList, this.rightGoodsList)
|
|
},
|
|
},
|
|
|
|
|
|
// 添加
|
|
// 添加
|
|
addGoods() {
|
|
addGoods() {
|
|
- this.rightGoodsList = this.delRepeat(this.leftSelection, this.rightGoodsList);
|
|
|
|
|
|
+ this.rightGoodsList = this.delRepeat(this.leftSelection, this.rightGoodsList)
|
|
},
|
|
},
|
|
|
|
|
|
// 删除
|
|
// 删除
|
|
deleteGoods() {
|
|
deleteGoods() {
|
|
- let rightGoodsList = this.rightGoodsList;
|
|
|
|
- let rightSelection = this.rightSelection;
|
|
|
|
- for(let i = 0; i < rightGoodsList.length; i++) {
|
|
|
|
- for(let j = 0; j < rightSelection.length; j++) {
|
|
|
|
- if(rightSelection[j].materialId == rightGoodsList[i].materialId){
|
|
|
|
- this.rightGoodsList.splice(i, 1);
|
|
|
|
|
|
+ const rightGoodsList = this.rightGoodsList
|
|
|
|
+ const rightSelection = this.rightSelection
|
|
|
|
+ for (let i = 0; i < rightGoodsList.length; i++) {
|
|
|
|
+ for (let j = 0; j < rightSelection.length; j++) {
|
|
|
|
+ if (rightSelection[j].materialId == rightGoodsList[i].materialId) {
|
|
|
|
+ this.rightGoodsList.splice(i, 1)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -737,51 +744,51 @@ export default {
|
|
|
|
|
|
// 全部删除
|
|
// 全部删除
|
|
deleteAllGoods() {
|
|
deleteAllGoods() {
|
|
- this.rightGoodsList = [];
|
|
|
|
|
|
+ this.rightGoodsList = []
|
|
},
|
|
},
|
|
|
|
|
|
// 确定 添加产品
|
|
// 确定 添加产品
|
|
submitAddGoods() {
|
|
submitAddGoods() {
|
|
// this.goodsList = this.delRepeat(this.rightGoodsList, this.goodsList);
|
|
// this.goodsList = this.delRepeat(this.rightGoodsList, this.goodsList);
|
|
- this.goodsList = this.goodsList.concat(this.rightGoodsList);
|
|
|
|
- this.isShowGoodsDialog = false;
|
|
|
|
- this.leftGoodsList = [];
|
|
|
|
- this.rightGoodsList = [];
|
|
|
|
|
|
+ this.goodsList = this.goodsList.concat(this.rightGoodsList)
|
|
|
|
+ this.isShowGoodsDialog = false
|
|
|
|
+ this.leftGoodsList = []
|
|
|
|
+ this.rightGoodsList = []
|
|
},
|
|
},
|
|
|
|
|
|
// 删除产品
|
|
// 删除产品
|
|
deleteItem(index) {
|
|
deleteItem(index) {
|
|
- this.goodsList.splice(index, 1);
|
|
|
|
|
|
+ this.goodsList.splice(index, 1)
|
|
},
|
|
},
|
|
|
|
|
|
// 导入产品
|
|
// 导入产品
|
|
getImportList(data) {
|
|
getImportList(data) {
|
|
- this.goodsList = this.goodsList.concat(data);
|
|
|
|
|
|
+ this.goodsList = this.goodsList.concat(data)
|
|
},
|
|
},
|
|
|
|
|
|
clickSubmitForm(type) {
|
|
clickSubmitForm(type) {
|
|
this.$refs.mainForm.validate((valid) => {
|
|
this.$refs.mainForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- for(let i=0; i<this.goodsList.length; i++) {
|
|
|
|
- if(!this.goodsList[i].saleTypeId) {
|
|
|
|
- this.$errorMsg('请选择销售类型');
|
|
|
|
- return;
|
|
|
|
|
|
+ for (let i = 0; i < this.goodsList.length; i++) {
|
|
|
|
+ if (!this.goodsList[i].saleTypeId) {
|
|
|
|
+ this.$errorMsg('请选择销售类型')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- if(!this.goodsList[i].materialNumber) {
|
|
|
|
- this.$errorMsg('请选择产品');
|
|
|
|
- return;
|
|
|
|
|
|
+ if (!this.goodsList[i].materialNumber) {
|
|
|
|
+ this.$errorMsg('请选择产品')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- let goodsList = JSON.parse(JSON.stringify(this.goodsList));
|
|
|
|
|
|
+ const goodsList = JSON.parse(JSON.stringify(this.goodsList))
|
|
|
|
|
|
goodsList.forEach(item => {
|
|
goodsList.forEach(item => {
|
|
- delete item.productList;
|
|
|
|
- delete item.id;
|
|
|
|
|
|
+ delete item.productList
|
|
|
|
+ delete item.id
|
|
})
|
|
})
|
|
|
|
|
|
- let saleManItem = this.mainForm.salesMan ? this.salesmanList.find(o => o.adminUserId == this.mainForm.salesMan) : '';
|
|
|
|
- let params = {
|
|
|
|
|
|
+ const saleManItem = this.mainForm.salesMan ? this.salesmanList.find(o => o.adminUserId == this.mainForm.salesMan) : ''
|
|
|
|
+ const params = {
|
|
// orderDate: this.mainForm.orderDate + ' 00:00:00',
|
|
// orderDate: this.mainForm.orderDate + ' 00:00:00',
|
|
// mainId: this.mainForm.mainId,
|
|
// mainId: this.mainForm.mainId,
|
|
projectName: this.mainForm.enginName,
|
|
projectName: this.mainForm.enginName,
|
|
@@ -805,41 +812,41 @@ export default {
|
|
fileNo: this.mainForm.fileNo,
|
|
fileNo: this.mainForm.fileNo,
|
|
items: goodsList
|
|
items: goodsList
|
|
}
|
|
}
|
|
- if(type === 1) {
|
|
|
|
- if(this.listItem) {
|
|
|
|
- params.enginInfoId = this.listItem.enginInfoId;
|
|
|
|
|
|
+ if (type === 1) {
|
|
|
|
+ if (this.listItem) {
|
|
|
|
+ params.enginInfoId = this.listItem.enginInfoId
|
|
editEngin(params).then(res => {
|
|
editEngin(params).then(res => {
|
|
- this.$successMsg('编辑成功');
|
|
|
|
- this.goBack();
|
|
|
|
- this.$parent.getList();
|
|
|
|
|
|
+ this.$successMsg('编辑成功')
|
|
|
|
+ this.goBack()
|
|
|
|
+ this.$parent.getList()
|
|
})
|
|
})
|
|
- }else {
|
|
|
|
- params.customerNumber = this.mainForm.jxsNum;
|
|
|
|
- params.customerName = this.mainForm.jxsName;
|
|
|
|
- params.customerId = this.mainForm.jxsId;
|
|
|
|
|
|
+ } else {
|
|
|
|
+ params.customerNumber = this.mainForm.jxsNum
|
|
|
|
+ params.customerName = this.mainForm.jxsName
|
|
|
|
+ params.customerId = this.mainForm.jxsId
|
|
addEngin(params).then(res => {
|
|
addEngin(params).then(res => {
|
|
- this.$successMsg('保存成功');
|
|
|
|
- this.goBack();
|
|
|
|
- this.$parent.getList();
|
|
|
|
|
|
+ this.$successMsg('保存成功')
|
|
|
|
+ this.goBack()
|
|
|
|
+ this.$parent.getList()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
- if(this.listItem) {
|
|
|
|
- params.enginInfoId = this.listItem.enginInfoId;
|
|
|
|
- }else {
|
|
|
|
- params.customerNumber = this.mainForm.jxsNum;
|
|
|
|
- params.customerName = this.mainForm.jxsName;
|
|
|
|
- params.customerId = this.mainForm.jxsId;
|
|
|
|
|
|
+ } else {
|
|
|
|
+ if (this.listItem) {
|
|
|
|
+ params.enginInfoId = this.listItem.enginInfoId
|
|
|
|
+ } else {
|
|
|
|
+ params.customerNumber = this.mainForm.jxsNum
|
|
|
|
+ params.customerName = this.mainForm.jxsName
|
|
|
|
+ params.customerId = this.mainForm.jxsId
|
|
}
|
|
}
|
|
submitEngin(params).then(res => {
|
|
submitEngin(params).then(res => {
|
|
- this.$successMsg('提交审核成功');
|
|
|
|
- this.goBack();
|
|
|
|
- this.$parent.getList();
|
|
|
|
|
|
+ this.$successMsg('提交审核成功')
|
|
|
|
+ this.goBack()
|
|
|
|
+ this.$parent.getList()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- },
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|