|
@@ -1,33 +1,48 @@
|
|
|
<template>
|
|
|
<div class="detail-container">
|
|
|
- <el-page-header :content="listItem ? '编辑':'新增'" @back="goBack" />
|
|
|
+ <el-page-header :content="listItem ? '编辑' : '新增'" @back="goBack" />
|
|
|
|
|
|
<div class="main-title">
|
|
|
<div class="title">工程订单</div>
|
|
|
</div>
|
|
|
|
|
|
- <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="110px" size="small" label-position="right">
|
|
|
+ <el-form
|
|
|
+ ref="mainForm"
|
|
|
+ :model="mainForm"
|
|
|
+ :rules="mainFormRules"
|
|
|
+ label-width="110px"
|
|
|
+ size="small"
|
|
|
+ label-position="right"
|
|
|
+ >
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="工程订单号" prop="orderNum">
|
|
|
<el-input v-model="mainForm.orderNum" placeholder="系统自动生成" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="8" style="height: 51px">
|
|
|
<el-form-item label="单据日期" prop="orderDate">
|
|
|
<el-date-picker
|
|
|
v-model="mainForm.orderDate"
|
|
|
disabled
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- style="width: 100%;"
|
|
|
+ style="width: 100%"
|
|
|
placeholder="系统自动生成"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="业务员" prop="salesMan">
|
|
|
- <el-select v-model="mainForm.salesMan" placeholder="选择业务员" disabled size="small" filterable clearable style="width: 100%">
|
|
|
+ <el-select
|
|
|
+ v-model="mainForm.salesMan"
|
|
|
+ placeholder="选择业务员"
|
|
|
+ disabled
|
|
|
+ size="small"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in salesmanList"
|
|
|
:key="item.adminUserId"
|
|
@@ -53,21 +68,25 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="16">
|
|
|
<el-form-item label="经销商名称" prop="jxsNum">
|
|
|
- <el-select v-model="mainForm.jxsNum" placeholder="选择经销商" size="small" filterable clearable style="width: 100%" :disabled="listItem != undefined || isDealer" @change="changeDealer">
|
|
|
- <el-option
|
|
|
- v-for="item in dealerList"
|
|
|
- :key="item.number"
|
|
|
- :label="item.name"
|
|
|
- :value="item.number"
|
|
|
- />
|
|
|
+ <el-select
|
|
|
+ v-model="mainForm.jxsNum"
|
|
|
+ placeholder="选择经销商"
|
|
|
+ size="small"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ :disabled="listItem != undefined || isDealer"
|
|
|
+ @change="changeDealer"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in dealerList" :key="item.number" :label="item.name" :value="item.number" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="工程登录编号" prop="enginOrderNum">
|
|
|
- <div style="display: flex;">
|
|
|
+ <div style="display: flex">
|
|
|
<el-input v-model="mainForm.enginOrderNum" placeholder="请引用工程登录" disabled />
|
|
|
- <el-button style="margin-left: 10px;" @click="openShareDetail">引用</el-button>
|
|
|
+ <el-button style="margin-left: 10px" @click="openShareDetail">引用</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -128,7 +147,13 @@
|
|
|
</el-col>
|
|
|
<el-col v-if="!isDealer" :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="权限分类" prop="powerCategory">
|
|
|
- <el-select v-model="mainForm.powerCategory" placeholder="选择权限分类" size="small" clearable style="width: 100%">
|
|
|
+ <el-select
|
|
|
+ v-model="mainForm.powerCategory"
|
|
|
+ placeholder="选择权限分类"
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in powerList"
|
|
|
:key="item.dictCode"
|
|
@@ -140,7 +165,11 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
|
<el-form-item label="格力回复" prop="geLiNote">
|
|
|
- <el-input v-model="mainForm.geLiNote" :placeholder="isDealer ? '' : '请输入格力回复'" :disabled="isDealer" />
|
|
|
+ <el-input
|
|
|
+ v-model="mainForm.geLiNote"
|
|
|
+ :placeholder="isDealer ? '' : '请输入格力回复'"
|
|
|
+ :disabled="isDealer"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
@@ -153,14 +182,14 @@
|
|
|
<el-input v-model="mainForm.createMan" placeholder="请输入制单人" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="8" style="height: 51px">
|
|
|
<el-form-item label="制单日期" prop="createDate">
|
|
|
<el-date-picker
|
|
|
v-model="mainForm.createDate"
|
|
|
disabled
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- style="width: 100%;"
|
|
|
+ style="width: 100%"
|
|
|
placeholder="选择日期"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -177,17 +206,25 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
|
<el-form-item>
|
|
|
- <el-checkbox v-model="isPlanOrder" :falsebled="listItem" :true-label="true" :false-label="false">计划单</el-checkbox>
|
|
|
+ <el-checkbox v-model="isPlanOrder" :disabled="listItem" :true-label="true" :false-label="false"
|
|
|
+ >计划单</el-checkbox
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
|
|
|
<div class="main-title">
|
|
|
<div class="title">货品信息</div>
|
|
|
<div>
|
|
|
- <el-select v-model="warehouseValue" placeholder="请选择发货仓库" size="small" style="margin-right: 10px" :disabled="!flag" @change="setStock">
|
|
|
+ <el-select
|
|
|
+ v-model="warehouseValue"
|
|
|
+ placeholder="请选择发货仓库"
|
|
|
+ size="small"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ :disabled="!flag"
|
|
|
+ @change="setStock"
|
|
|
+ >
|
|
|
<el-option v-for="(item, index) in warehouseList" :key="index" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
<el-button type="primary" size="small" icon="el-icon-search" @click="checkStock">检查库存</el-button>
|
|
@@ -195,13 +232,28 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="table" style="margin-top: 20px">
|
|
|
- <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400" @selection-change="handleSelectionChange">
|
|
|
+ <el-table
|
|
|
+ :data="goodsList"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ stripe
|
|
|
+ max-height="400"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
<el-table-column align="center" type="selection" width="55" />
|
|
|
<el-table-column align="center" label="序号" type="index" width="50" />
|
|
|
<!-- <el-table-column align="center" label="引用记录" prop="useRefCount" min-width="160" show-overflow-tooltip></el-table-column>-->
|
|
|
<el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip />
|
|
|
<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="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>
|
|
|
<template slot-scope="scope">
|
|
@@ -213,7 +265,13 @@
|
|
|
<el-table-column align="center" label="已订数量" prop="hasOrderQty" min-width="80" show-overflow-tooltip />
|
|
|
<el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-if="!isDealer" v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent />
|
|
|
+ <el-input
|
|
|
+ v-if="!isDealer"
|
|
|
+ v-model="scope.row.price"
|
|
|
+ size="small"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ />
|
|
|
<div v-else>{{ scope.row.price }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -230,7 +288,13 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="返利钱包" prop="customerWalletId2" min-width="160" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利类型" size="small" clearable @change="changeFlWallet(scope.$index)">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.customerWalletId2"
|
|
|
+ placeholder="选择返利类型"
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ @change="changeFlWallet(scope.$index)"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in scope.row.rebateWallets"
|
|
|
:key="item.customerWalletId"
|
|
@@ -252,7 +316,13 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="现金钱包" prop="customerWalletId" min-width="160" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-select v-model="scope.row.customerWalletId" placeholder="选择现金钱包" size="small" clearable @change="changeXjWallet(scope.$index)">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.customerWalletId"
|
|
|
+ placeholder="选择现金钱包"
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ @change="changeXjWallet(scope.$index)"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in scope.row.wallets"
|
|
|
:key="item.customerWalletId"
|
|
@@ -264,7 +334,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="实付金额" prop="qty" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ ((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100 }}
|
|
|
+ {{
|
|
|
+ (scope.row.price * scope.row.qty * 100 -
|
|
|
+ ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 -
|
|
|
+ ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) /
|
|
|
+ 100
|
|
|
+ }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100">
|
|
@@ -313,7 +388,7 @@
|
|
|
<div class="footer">
|
|
|
<!-- <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button> -->
|
|
|
<el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>
|
|
|
- <el-popconfirm title="确定关闭吗?" style="margin-left: 10px;" @onConfirm="goBack">
|
|
|
+ <el-popconfirm title="确定关闭吗?" style="margin-left: 10px" @onConfirm="goBack">
|
|
|
<el-button slot="reference">返回列表</el-button>
|
|
|
</el-popconfirm>
|
|
|
</div>
|
|
@@ -347,7 +422,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <div class="table" style="margin: 10px 0 20px;">
|
|
|
+ <div class="table" style="margin: 10px 0 20px">
|
|
|
<el-table
|
|
|
v-loading="dialogTable_listLoading"
|
|
|
:data="dialogTable_dataList"
|
|
@@ -384,12 +459,21 @@
|
|
|
<el-button @click="isShowDialog = false">关 闭</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getOrderDetail, getComLoginList, getComLoginDetail, getWarehouseList, addCom, editCom, submitCom, checkStock, getWalletList } from '@/api/supply/engin'
|
|
|
+import {
|
|
|
+ getOrderDetail,
|
|
|
+ getComLoginList,
|
|
|
+ getComLoginDetail,
|
|
|
+ getWarehouseList,
|
|
|
+ addCom,
|
|
|
+ editCom,
|
|
|
+ submitCom,
|
|
|
+ checkStock,
|
|
|
+ getWalletList
|
|
|
+} from '@/api/supply/engin'
|
|
|
import { getDictList, getTypeList, getSalesmanList, getDealerList } from '@/api/common'
|
|
|
import { findElem } from '@/utils/util'
|
|
|
|
|
@@ -607,7 +691,7 @@ export default {
|
|
|
getWarehouseList({
|
|
|
pageNum: 1,
|
|
|
pageSize: -1
|
|
|
- }).then((res) => {
|
|
|
+ }).then(res => {
|
|
|
this.warehouseList = res.data.records
|
|
|
})
|
|
|
},
|
|
@@ -818,9 +902,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.goodsList.forEach(item => {
|
|
|
- item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : ''
|
|
|
- item.serviceId = (item.wallets && item.wallets.length) ? item.wallets[0].serviceId : ''
|
|
|
- item.serviceName = (item.wallets && item.wallets.length) ? item.wallets[0].serviceName : ''
|
|
|
+ item.customerWalletId = item.wallets && item.wallets.length ? item.wallets[0].customerWalletId : ''
|
|
|
+ item.serviceId = item.wallets && item.wallets.length ? item.wallets[0].serviceId : ''
|
|
|
+ item.serviceName = item.wallets && item.wallets.length ? item.wallets[0].serviceName : ''
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -833,7 +917,9 @@ export default {
|
|
|
// 修改返利钱包
|
|
|
changeFlWallet(index) {
|
|
|
if (this.goodsList[index].customerWalletId2) {
|
|
|
- const obj = this.goodsList[index].rebateWallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2)
|
|
|
+ const obj = this.goodsList[index].rebateWallets.find(
|
|
|
+ o => o.customerWalletId == this.goodsList[index].customerWalletId2
|
|
|
+ )
|
|
|
this.goodsList[index].rebateRate = obj.rebateRate
|
|
|
this.goodsList[index].customerWalletName2 = obj.customerWalletName
|
|
|
} else {
|
|
@@ -845,7 +931,9 @@ export default {
|
|
|
// 修改现金钱包
|
|
|
changeXjWallet(index) {
|
|
|
if (this.goodsList[index].customerWalletId) {
|
|
|
- const obj = this.goodsList[index].wallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId)
|
|
|
+ const obj = this.goodsList[index].wallets.find(
|
|
|
+ o => o.customerWalletId == this.goodsList[index].customerWalletId
|
|
|
+ )
|
|
|
this.goodsList[index].customerWalletName = obj.customerWalletName
|
|
|
this.goodsList[index].serviceId = obj.serviceId
|
|
|
this.goodsList[index].serviceName = obj.serviceName
|
|
@@ -901,7 +989,7 @@ export default {
|
|
|
|
|
|
// 保存 / 提交审核
|
|
|
clickSubmitForm(type) {
|
|
|
- this.$refs.mainForm.validate((valid) => {
|
|
|
+ this.$refs.mainForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.goodsList.length < 1) {
|
|
|
return this.$errorMsg('请添加产品')
|
|
@@ -936,7 +1024,9 @@ export default {
|
|
|
delete item.wallets
|
|
|
})
|
|
|
|
|
|
- const saleManItem = this.mainForm.salesMan ? this.salesmanList.find(o => o.adminUserId == this.mainForm.salesMan) : ''
|
|
|
+ const saleManItem = this.mainForm.salesMan
|
|
|
+ ? this.salesmanList.find(o => o.adminUserId == this.mainForm.salesMan)
|
|
|
+ : ''
|
|
|
const params = {
|
|
|
enginOrderId: this.mainForm.orderNum,
|
|
|
// orderDate: this.mainForm.orderDate,
|
|
@@ -1002,30 +1092,30 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
- .detail-container {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- .main-title {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- margin-top: 20px;
|
|
|
- height: 60px;
|
|
|
- border-bottom: 1px solid #DCDFE6;
|
|
|
- margin-bottom: 20px;
|
|
|
- .title {
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 600;
|
|
|
- padding-left: 10px;
|
|
|
- }
|
|
|
+.detail-container {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+.main-title {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 20px;
|
|
|
+ height: 60px;
|
|
|
+ border-bottom: 1px solid #dcdfe6;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ .title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 600;
|
|
|
+ padding-left: 10px;
|
|
|
}
|
|
|
+}
|
|
|
|
|
|
- ::v-deep input::-webkit-outer-spin-button,
|
|
|
- ::v-deep input::-webkit-inner-spin-button {
|
|
|
- -webkit-appearance: none;
|
|
|
- }
|
|
|
- ::v-deep input[type='number'] {
|
|
|
- -moz-appearance: textfield;
|
|
|
- }
|
|
|
+::v-deep input::-webkit-outer-spin-button,
|
|
|
+::v-deep input::-webkit-inner-spin-button {
|
|
|
+ -webkit-appearance: none;
|
|
|
+}
|
|
|
+::v-deep input[type='number'] {
|
|
|
+ -moz-appearance: textfield;
|
|
|
+}
|
|
|
</style>
|