|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="detail-container">
|
|
<div class="detail-container">
|
|
- <el-page-header @back="goBack" content="审批"></el-page-header>
|
|
|
|
|
|
+ <el-page-header content="审批" @back="goBack" />
|
|
|
|
|
|
<div class="main-title">
|
|
<div class="main-title">
|
|
<div class="title">工程信息单</div>
|
|
<div class="title">工程信息单</div>
|
|
@@ -10,11 +10,11 @@
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">工程登录编号</div>
|
|
<div class="label">工程登录编号</div>
|
|
- <div class="value">{{detailData.enginInfoNo}}</div>
|
|
|
|
|
|
+ <div class="value">{{ detailData.enginInfoNo }}</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">订单日期</div>
|
|
<div class="label">订单日期</div>
|
|
- <div class="value">{{detailData.orderDate}}</div>
|
|
|
|
|
|
+ <div class="value">{{ detailData.orderDate }}</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">业务员</div>
|
|
<div class="label">业务员</div>
|
|
@@ -24,19 +24,19 @@
|
|
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>
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">经销商编码</div>
|
|
<div class="label">经销商编码</div>
|
|
- <div class="value">{{detailData.customerNumber}}</div>
|
|
|
|
|
|
+ <div class="value">{{ detailData.customerNumber }}</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">项目名称</div>
|
|
<div class="label">项目名称</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.projectName" placeholder="请输入项目名称"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.projectName" placeholder="请输入项目名称" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
@@ -45,19 +45,21 @@
|
|
<el-select v-model="detailData.machineType" placeholder="选择机型类别" size="small" clearable style="width: 100%">
|
|
<el-select v-model="detailData.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>
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">经销商名称</div>
|
|
<div class="label">经销商名称</div>
|
|
- <div class="value">{{detailData.customerName}}</div>
|
|
|
|
|
|
+ <div class="value">{{ detailData.customerName }}</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">使用单位</div>
|
|
<div class="label">使用单位</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.useUnit" placeholder="请输入使用单位"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.useUnit" placeholder="请输入使用单位" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
@@ -66,21 +68,23 @@
|
|
<el-select v-model="detailData.tradeCategory" placeholder="选择行业类别" size="small" clearable style="width: 100%">
|
|
<el-select v-model="detailData.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>
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">工程编号</div>
|
|
<div class="label">工程编号</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.projectNo" placeholder="请输入工程编号"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.projectNo" placeholder="请输入工程编号" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">厂工程编码</div>
|
|
<div class="label">厂工程编码</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.enginFactoryNo" placeholder="请输入厂工程编码"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.enginFactoryNo" placeholder="请输入厂工程编码" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
@@ -89,64 +93,66 @@
|
|
<el-select v-model="detailData.enginSignType" placeholder="选择工程登录类型" size="small" clearable style="width: 100%">
|
|
<el-select v-model="detailData.enginSignType" 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>
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">联系人</div>
|
|
<div class="label">联系人</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.linkman" placeholder="请输入联系人"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.linkman" placeholder="请输入联系人" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">联系电话</div>
|
|
<div class="label">联系电话</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.phone" placeholder="请输入联系电话"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.phone" placeholder="请输入联系电话" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">固定电话</div>
|
|
<div class="label">固定电话</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.tel" placeholder="请输入固定电话"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.tel" placeholder="请输入固定电话" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">文件编号</div>
|
|
<div class="label">文件编号</div>
|
|
- <div class="value">{{detailData.fileNo}}</div>
|
|
|
|
|
|
+ <div class="value">{{ detailData.fileNo }}</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="item">
|
|
<el-col :span="24" class="item">
|
|
<div class="label">安装地址</div>
|
|
<div class="label">安装地址</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.installAddress" placeholder="请输入安装地址"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.installAddress" placeholder="请输入安装地址" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="24" class="item" v-if="!isCustomer">
|
|
|
|
|
|
+ <el-col v-if="!isCustomer" :span="24" class="item">
|
|
<div class="label">格力内部备注</div>
|
|
<div class="label">格力内部备注</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="item">
|
|
<el-col :span="24" class="item">
|
|
<div class="label">格力回复</div>
|
|
<div class="label">格力回复</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.geLiNote" placeholder="请输入格力回复"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.geLiNote" placeholder="请输入格力回复" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="item">
|
|
<el-col :span="24" class="item">
|
|
<div class="label">备注</div>
|
|
<div class="label">备注</div>
|
|
<div class="value">
|
|
<div class="value">
|
|
- <el-input v-model="detailData.remark" placeholder="请输入备注"></el-input>
|
|
|
|
|
|
+ <el-input v-model="detailData.remark" placeholder="请输入备注" />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">制单人</div>
|
|
<div class="label">制单人</div>
|
|
- <div class="value">{{detailData.createName}}</div>
|
|
|
|
|
|
+ <div class="value">{{ detailData.createName }}</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">制单日期</div>
|
|
<div class="label">制单日期</div>
|
|
- <div class="value">{{detailData.createTime}}</div>
|
|
|
|
|
|
+ <div class="value">{{ detailData.createTime }}</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="item">
|
|
<el-col :span="8" class="item">
|
|
<div class="label">合同有效期</div>
|
|
<div class="label">合同有效期</div>
|
|
@@ -157,8 +163,8 @@
|
|
prefix-icon="none"
|
|
prefix-icon="none"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
- placeholder="选择日期">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ placeholder="选择日期"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -172,44 +178,52 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<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"
|
|
|
|
- show-summary
|
|
|
|
- :summary-method="$getSummaries">
|
|
|
|
- <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
|
|
|
|
- <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
+ <el-table
|
|
|
|
+ :data="goodsList"
|
|
|
|
+ element-loading-text="Loading"
|
|
|
|
+ border
|
|
|
|
+ fit
|
|
|
|
+ highlight-current-row
|
|
|
|
+ stripe
|
|
|
|
+ max-height="400"
|
|
|
|
+ show-summary
|
|
|
|
+ :summary-method="$getSummaries"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column align="center" label="序号" type="index" width="50" />
|
|
|
|
+ <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
|
|
<el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
|
|
<el-table-column align="left" 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="small"></el-input>
|
|
|
|
|
|
+ <el-input v-model="scope.row.specification" size="small" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
|
|
<el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
|
|
<el-table-column align="right" 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="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
|
|
<el-table-column align="right" 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="right" label="订单金额" min-width="100" prop="compute_amount" show-overflow-tooltip>
|
|
<el-table-column align="right" label="订单金额" min-width="100" prop="compute_amount" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{scope.row.compute_amount | numToFixed}}
|
|
|
|
|
|
+ {{ scope.row.compute_amount | numToFixed }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="left" label="备注" prop="remark" min-width="200" show-overflow-tooltip>
|
|
<el-table-column align="left" 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="left" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="left" 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 type="text" @click="deleteItem(scope.$index, scope.row.id)">删除</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -222,7 +236,7 @@
|
|
<el-row :gutter="0">
|
|
<el-row :gutter="0">
|
|
<el-col :span="12" class="item">
|
|
<el-col :span="12" class="item">
|
|
<div class="label">审批人</div>
|
|
<div class="label">审批人</div>
|
|
- <div class="value">{{userName}}</div>
|
|
|
|
|
|
+ <div class="value">{{ userName }}</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12" class="item">
|
|
<el-col :span="12" class="item">
|
|
<div class="label">审批结果</div>
|
|
<div class="label">审批结果</div>
|
|
@@ -235,18 +249,18 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="item">
|
|
<el-col :span="24" class="item">
|
|
<div class="label">审批说明</div>
|
|
<div class="label">审批说明</div>
|
|
- <div class="value"><el-input v-model="examineForm.remark" placeholder="请输入内容"></el-input></div>
|
|
|
|
|
|
+ <div class="value"><el-input v-model="examineForm.remark" placeholder="请输入内容" /></div>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="page-footer">
|
|
<div class="page-footer">
|
|
<div class="footer">
|
|
<div class="footer">
|
|
- <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
|
|
|
|
|
|
+ <el-button type="primary" :loading="formLoading" @click="clickSubmitForm">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
title="确定关闭吗?"
|
|
title="确定关闭吗?"
|
|
- @onConfirm="goBack"
|
|
|
|
style="margin-left: 10px;"
|
|
style="margin-left: 10px;"
|
|
|
|
+ @onConfirm="goBack"
|
|
>
|
|
>
|
|
<el-button slot="reference">返回列表</el-button>
|
|
<el-button slot="reference">返回列表</el-button>
|
|
</el-popconfirm>
|
|
</el-popconfirm>
|
|
@@ -259,30 +273,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">
|
|
@@ -297,22 +311,22 @@
|
|
<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="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="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>
|
|
@@ -324,16 +338,15 @@
|
|
</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" 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>
|
|
</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>
|
|
@@ -344,56 +357,55 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getEnginDetail, getRetailProductList, examineEngin } from "@/api/supply/engin";
|
|
|
|
-import { getTypeList, getSalesmanList, getDictList } from "@/api/common";
|
|
|
|
-import { mapGetters } from "vuex";
|
|
|
|
|
|
+import { getEnginDetail, getRetailProductList, examineEngin } from '@/api/supply/engin'
|
|
|
|
+import { getTypeList, getSalesmanList, getDictList } from '@/api/common'
|
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'EnginExamine',
|
|
name: 'EnginExamine',
|
|
componentName: 'EnginExamine',
|
|
componentName: 'EnginExamine',
|
|
- props: ['listItem'],
|
|
|
|
filters: {
|
|
filters: {
|
|
statusFilter(val) {
|
|
statusFilter(val) {
|
|
const statusList = [
|
|
const statusList = [
|
|
{ label: '已保存', value: 'SAVE' },
|
|
{ label: '已保存', value: 'SAVE' },
|
|
{ label: '待审核', value: 'WAIT' },
|
|
{ label: '待审核', value: 'WAIT' },
|
|
{ label: '审核通过', value: 'OK' },
|
|
{ label: '审核通过', value: 'OK' },
|
|
- // { label: '审核驳回', value: 'FAIL' },,
|
|
|
|
- { label: '已关闭', value: 'CLOSE' },
|
|
|
|
- ];
|
|
|
|
- let obj = statusList.find(o => o.value == val);
|
|
|
|
|
|
+ // { label: '审核驳回', value: 'FAIL' },,
|
|
|
|
+ { label: '已关闭', value: 'CLOSE' }
|
|
|
|
+ ]
|
|
|
|
+ const obj = statusList.find(o => o.value == val)
|
|
return obj ? obj.label : ''
|
|
return obj ? obj.label : ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ props: ['listItem'],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
detailData: {},
|
|
detailData: {},
|
|
goodsList: [],
|
|
goodsList: [],
|
|
- userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
|
|
|
|
|
|
+ userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
|
|
|
|
|
|
formLoading: false,
|
|
formLoading: false,
|
|
examineForm: {
|
|
examineForm: {
|
|
examineResult: true,
|
|
examineResult: true,
|
|
- remark: '',
|
|
|
|
|
|
+ remark: ''
|
|
},
|
|
},
|
|
-
|
|
|
|
salesTypeList: [],
|
|
salesTypeList: [],
|
|
salesmanList: [],
|
|
salesmanList: [],
|
|
machineTypeList: [],
|
|
machineTypeList: [],
|
|
loginTypeList: [],
|
|
loginTypeList: [],
|
|
powerList: [],
|
|
powerList: [],
|
|
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: '其他' }
|
|
],
|
|
],
|
|
|
|
|
|
isShowGoodsDialog: false,
|
|
isShowGoodsDialog: false,
|
|
@@ -403,7 +415,7 @@ export default {
|
|
proModel: '',
|
|
proModel: '',
|
|
price1: '',
|
|
price1: '',
|
|
price2: '',
|
|
price2: '',
|
|
- salesType: '',
|
|
|
|
|
|
+ salesType: ''
|
|
},
|
|
},
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
listTotal: 0,
|
|
listTotal: 0,
|
|
@@ -413,21 +425,20 @@ export default {
|
|
|
|
|
|
leftSelection: [],
|
|
leftSelection: [],
|
|
rightSelection: [],
|
|
rightSelection: [],
|
|
-
|
|
|
|
- salesTypeList:[]
|
|
|
|
|
|
+ examineStatus: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
- computed:{
|
|
|
|
- ...mapGetters(['isCustomer']),
|
|
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapGetters(['isCustomer'])
|
|
},
|
|
},
|
|
|
|
|
|
watch: {
|
|
watch: {
|
|
goodsList: {
|
|
goodsList: {
|
|
handler(newValue, oldValue) {
|
|
handler(newValue, oldValue) {
|
|
- if(newValue && newValue.length) {
|
|
|
|
|
|
+ if (newValue && newValue.length) {
|
|
newValue.forEach((item, index) => {
|
|
newValue.forEach((item, index) => {
|
|
- this.goodsList[index].compute_amount = item.price * item.qty;
|
|
|
|
|
|
+ this.goodsList[index].compute_amount = item.price * item.qty
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -437,27 +448,28 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
created() {
|
|
created() {
|
|
- this.getDetail();
|
|
|
|
- this.getTypeList();
|
|
|
|
- this.getSalesmanList();
|
|
|
|
- this.getDictList();
|
|
|
|
|
|
+ this.getDetail()
|
|
|
|
+ this.getTypeList()
|
|
|
|
+ this.getSalesmanList()
|
|
|
|
+ this.getDictList()
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
// 返回列表
|
|
// 返回列表
|
|
goBack() {
|
|
goBack() {
|
|
- this.$emit('backListFormDetail');
|
|
|
|
|
|
+ this.$emit('backListFormDetail')
|
|
},
|
|
},
|
|
|
|
|
|
// 获取详情
|
|
// 获取详情
|
|
getDetail() {
|
|
getDetail() {
|
|
- getEnginDetail({id: this.listItem.enginInfoId}).then(res => {
|
|
|
|
- this.detailData = res.data;
|
|
|
|
|
|
+ getEnginDetail({ id: this.listItem.enginInfoId }).then(res => {
|
|
|
|
+ this.detailData = res.data
|
|
|
|
+ this.examineStatus = res.data.examineStatus
|
|
res.data.items.forEach(item => {
|
|
res.data.items.forEach(item => {
|
|
- item.sums1 = ['qty', 'hasOrderQty', 'hasDeliverQty'];
|
|
|
|
- item.sums2 = ['compute_amount', 'price'];
|
|
|
|
|
|
+ item.sums1 = ['qty', 'hasOrderQty', 'hasDeliverQty']
|
|
|
|
+ item.sums2 = ['compute_amount', 'price']
|
|
})
|
|
})
|
|
- this.goodsList = res.data.items;
|
|
|
|
|
|
+ this.goodsList = res.data.items
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -465,10 +477,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
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
getSalesmanList() {
|
|
getSalesmanList() {
|
|
@@ -476,22 +488,22 @@ export default {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: -1,
|
|
pageSize: -1,
|
|
isCustomer: 0,
|
|
isCustomer: 0,
|
|
- status: true,
|
|
|
|
|
|
+ status: true
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- this.salesmanList = res.data.records;
|
|
|
|
|
|
+ this.salesmanList = res.data.records
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
// 获取产品大类列表
|
|
// 获取产品大类列表
|
|
getDictList() {
|
|
getDictList() {
|
|
- 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
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -505,38 +517,38 @@ export default {
|
|
materialName: this.goodsScreenForm.proName,
|
|
materialName: this.goodsScreenForm.proName,
|
|
specification: this.goodsScreenForm.proModel,
|
|
specification: this.goodsScreenForm.proModel,
|
|
price1: this.goodsScreenForm.price1,
|
|
price1: this.goodsScreenForm.price1,
|
|
- price2: this.goodsScreenForm.price2,
|
|
|
|
|
|
+ price2: this.goodsScreenForm.price2
|
|
}).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
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -544,87 +556,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)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -632,50 +644,54 @@ 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) {
|
|
|
|
- this.goodsList.splice(index, 1);
|
|
|
|
|
|
+ deleteItem(index, id) {
|
|
|
|
+ if (this.listItem && this.examineStatus === 'OK' && id) {
|
|
|
|
+ this.$errorMsg('不能删除')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.goodsList.splice(index, 1)
|
|
},
|
|
},
|
|
|
|
|
|
clickSubmitForm() {
|
|
clickSubmitForm() {
|
|
- if(!this.detailData.serviceId) {
|
|
|
|
- return this.$errorMsg('请选择业务员');
|
|
|
|
|
|
+ if (!this.detailData.serviceId) {
|
|
|
|
+ return this.$errorMsg('请选择业务员')
|
|
}
|
|
}
|
|
this.$confirm('此操作将审批订单, 是否继续?', '提示', {
|
|
this.$confirm('此操作将审批订单, 是否继续?', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- let saleManItem = this.salesmanList.find(o => o.adminUserId == this.detailData.serviceId);
|
|
|
|
- let params = JSON.parse(JSON.stringify(this.detailData));
|
|
|
|
- params.enginInfoId = this.listItem.enginInfoId;
|
|
|
|
- params.mainId = this.listItem.mainId;
|
|
|
|
- params.examineResult = this.examineForm.examineResult;
|
|
|
|
- params.examineNote = this.examineForm.remark;
|
|
|
|
- params.serviceName = saleManItem.nickName;
|
|
|
|
- params.items = this.goodsList;
|
|
|
|
- this.formLoading = true;
|
|
|
|
|
|
+ const saleManItem = this.salesmanList.find(o => o.adminUserId == this.detailData.serviceId)
|
|
|
|
+ const params = JSON.parse(JSON.stringify(this.detailData))
|
|
|
|
+ params.enginInfoId = this.listItem.enginInfoId
|
|
|
|
+ params.mainId = this.listItem.mainId
|
|
|
|
+ params.examineResult = this.examineForm.examineResult
|
|
|
|
+ params.examineNote = this.examineForm.remark
|
|
|
|
+ params.serviceName = saleManItem.nickName
|
|
|
|
+ params.items = this.goodsList
|
|
|
|
+ this.formLoading = true
|
|
examineEngin(params).then(res => {
|
|
examineEngin(params).then(res => {
|
|
- this.$successMsg('审批成功');
|
|
|
|
- this.goBack();
|
|
|
|
- this.$parent.getList();
|
|
|
|
|
|
+ this.$successMsg('审批成功')
|
|
|
|
+ this.goBack()
|
|
|
|
+ this.$parent.getList()
|
|
}).finally(res => {
|
|
}).finally(res => {
|
|
- this.formLoading = false;
|
|
|
|
|
|
+ this.formLoading = false
|
|
})
|
|
})
|
|
- }).catch(() => {});
|
|
|
|
- },
|
|
|
|
|
|
+ }).catch(() => {})
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|