还原覆盖代码
This commit is contained in:
parent
a232b6fe67
commit
50b54c5f43
|
|
@ -8,61 +8,61 @@
|
|||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="单据编号" prop="billno">
|
||||
<el-form-item :label="t('saleorder.billno')" prop="billno">
|
||||
<el-input
|
||||
v-model="queryParams.billno"
|
||||
placeholder="请输入单据编号"
|
||||
:placeholder="t('billform.pleaseenter')+''+t('saleorder.billno')"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户" prop="customerId">
|
||||
<el-form-item :label="t('saleorder.customer')" prop="customerId">
|
||||
<el-input
|
||||
v-model="queryParams.customerId"
|
||||
placeholder="请输入客户"
|
||||
:placeholder="t('billform.pleaseenter')+''+t('saleorder.customer')"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="bizdate">
|
||||
<el-form-item :label="t('saleorder.bizdate')" prop="bizdate">
|
||||
<el-date-picker
|
||||
v-model="queryParams.bizdate"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:start-placeholder="t('billform.startdate')"
|
||||
:end-placeholder="t('billform.enddate')"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认日期" prop="confirmdate">
|
||||
<el-form-item :label="t('saleorder.confirmdate')" prop="confirmdate">
|
||||
<el-date-picker
|
||||
v-model="queryParams.confirmdate"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:start-placeholder="t('billform.startdate')"
|
||||
:end-placeholder="t('billform.enddate')"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划日期" prop="plansenddate">
|
||||
<el-form-item :label="t('saleorder.plandate')" prop="plansenddate">
|
||||
<el-date-picker
|
||||
v-model="queryParams.plansenddate"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:start-placeholder="t('billform.startdate')"
|
||||
:end-placeholder="t('billform.enddate')"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="billStatus">
|
||||
<el-form-item :label="t('saleorder.orderstatus')" prop="billStatus">
|
||||
<el-select
|
||||
v-model="queryParams.billStatus"
|
||||
placeholder="请选择单据状态"
|
||||
:placeholder="t('billform.pleaseselect')+' '+t('saleorder.orderstatus')"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
|
|
@ -89,33 +89,27 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="手机" prop="phone">
|
||||
<el-form-item :label="t('saleorder.phone')" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入手机"
|
||||
:placeholder="t('billform.pleaseenter')+' '+t('saleorder.phone')"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remarks">
|
||||
<el-form-item :label="t('saleorder.remarks')" prop="remarks">
|
||||
<el-input
|
||||
v-model="queryParams.remarks"
|
||||
placeholder="请输入备注"
|
||||
:placeholder="t('billform.pleaseenter')+' '+t('saleorder.remarks')"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery">
|
||||
<Icon icon="ep:search" class="mr-5px"/>
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<Icon icon="ep:refresh" class="mr-5px"/>
|
||||
重置
|
||||
</el-button>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> {{t('billlist.search')}}</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> {{t('billlist.reset')}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
|
@ -135,14 +129,15 @@
|
|||
@click="handleUpdateBillStatus('invalid')"
|
||||
:disabled="selectionList.length === 0"
|
||||
>
|
||||
作废
|
||||
{{t('billlist.cancel')}}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@click="handleUpdateBillStatus('submit')"
|
||||
:disabled="selectionList.length === 0"
|
||||
>提交
|
||||
>
|
||||
{{t('billlist.submit')}}
|
||||
</el-button>
|
||||
<!--
|
||||
<el-button
|
||||
|
|
@ -167,8 +162,7 @@
|
|||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
>
|
||||
<Icon icon="ep:upload" class="mr-5px"/>
|
||||
导出
|
||||
<Icon icon="ep:upload" class="mr-5px" /> {{t('billlist.export')}}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -184,22 +178,17 @@
|
|||
:name="item.type"
|
||||
/>
|
||||
</el-tabs>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
:stripe="true"
|
||||
:show-overflow-tooltip="true"
|
||||
@selection-change="handleSelectionChange"
|
||||
:row-class-name="tableRowClassName"
|
||||
<el-table v-loading="loading" :data="list" :stripe="true"
|
||||
:show-overflow-tooltip="true"
|
||||
@selection-change="handleSelectionChange"
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
<el-table-column width="30" label="选择" type="selection"/>
|
||||
<el-table-column label="单据编号" align="center" prop="billno" width="120px"/>
|
||||
<el-table-column label="客户" align="center" prop="customerId" width="120px"/>
|
||||
<el-table-column label="销售员" align="center" prop="customerId" width="180px"/>
|
||||
<el-table-column label="跟单员" align="center" prop="customerId" width="180px"/>
|
||||
<el-table-column label="订单状态" align="center" prop="billStatus" width="180px">
|
||||
<el-table-column width="30" label="选择" type="selection" />
|
||||
<el-table-column :label="t('saleorder.billno')" align="center" prop="billno" width="180px"/>
|
||||
<el-table-column :label="t('saleorder.customer')" align="center" prop="customerId" width="120px"/>
|
||||
<el-table-column :label="t('saleorder.orderstatus')" align="center" prop="billStatus" width="180px">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.OMS_BILL_STATUS" :value="scope.row.billStatus"/>
|
||||
<dict-tag :type="DICT_TYPE.OMS_BILL_STATUS" :value="scope.row.billStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="订单状态" align="center" prop="orderStatus" width="180px">
|
||||
|
|
@ -208,52 +197,51 @@
|
|||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column
|
||||
label="业务日期"
|
||||
:label="t('saleorder.bizdate')"
|
||||
align="center"
|
||||
prop="bizdate"
|
||||
:formatter="dateFormatter2"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="确认日期"
|
||||
:label="t('saleorder.confirmdate')"
|
||||
align="center"
|
||||
prop="confirmdate"
|
||||
:formatter="dateFormatter2"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计划日期"
|
||||
:label="t('saleorder.plandate')"
|
||||
align="center"
|
||||
prop="plansenddate"
|
||||
:formatter="dateFormatter2"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="手机" align="center" prop="phone"/>
|
||||
<el-table-column label="备注" align="center" prop="remarks"/>
|
||||
<el-table-column :label="t('saleorder.phone')" align="center" prop="phone" />
|
||||
<el-table-column :label="t('saleorder.remarks')" align="center" prop="remarks" width="150"/>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
:label="t('saleorder.createTime')"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="更新时间"
|
||||
:label="t('saleorder.updateTime')"
|
||||
align="center"
|
||||
prop="updateTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" width="150" fixed="right">
|
||||
<el-table-column :label="t('billlist.operate')" align="center" width="150" fixed="right">
|
||||
<template #default="scope">
|
||||
|
||||
<router-link :to="'/order/createorder?id='+scope.row.id+'&_t=2'"
|
||||
v-if="scope.row.billStatus == 'B' ">
|
||||
<router-link :to="'/order/createorder?id='+scope.row.id+'&_t=2'" v-if="scope.row.billStatus == 'B' ">
|
||||
<el-button
|
||||
link
|
||||
type="primary">
|
||||
<Icon icon="ep:edit"/>
|
||||
修改
|
||||
<Icon icon="ep:edit" />
|
||||
{{t('billlist.edit')}}
|
||||
</el-button>
|
||||
</router-link>
|
||||
|
||||
|
|
@ -271,8 +259,8 @@
|
|||
type="primary"
|
||||
@click="openDetail(scope.row.id)"
|
||||
>
|
||||
<Icon icon="ep:notification"/>
|
||||
详情
|
||||
<Icon icon="ep:notification" />
|
||||
{{t('billlist.details')}}
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
link
|
||||
|
|
@ -294,16 +282,15 @@
|
|||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<SaleOrderForm ref="formRef" @success="getList"/>
|
||||
<SaleOrderForm ref="formRef" @success="getList" />
|
||||
|
||||
|
||||
|
||||
<!-- 驳回对话框 -->
|
||||
<el-dialog :title="rejectTitle" v-model="rejectOpen" width="750px" style="height: 210px;"
|
||||
append-to-body>
|
||||
<el-form ref="form" :model="rejectform" label-width="80px">
|
||||
<el-form-item label="驳回原因" prop="rejectReason">
|
||||
<el-input v-model="rejectform.rejectReason" :rows="3" type="textarea"
|
||||
placeholder="请输入驳回原因"/>
|
||||
<el-dialog :title="rejectTitle" v-model="rejectOpen" width="750px" style="height: 210px;" append-to-body>
|
||||
<el-form ref="form" :model="rejectform" label-width="80px" >
|
||||
<el-form-item label="驳回原因" prop="rejectReason" >
|
||||
<el-input v-model="rejectform.rejectReason" :rows="3" type="textarea" placeholder="请输入驳回原因" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="dialog-footer" style="text-align: right">
|
||||
|
|
@ -315,19 +302,19 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {getIntDictOptions, getStrDictOptions, DICT_TYPE} from '@/utils/dict'
|
||||
import { getIntDictOptions, getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import {dateFormatter, dateFormatter2} from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import {SaleOrderApi, SaleOrderVO} from '@/api/oms/saleorder'
|
||||
import { SaleOrderApi, SaleOrderVO } from '@/api/oms/saleorder'
|
||||
import SaleOrderForm from './SaleOrderForm.vue'
|
||||
import {checkPermi} from "@/utils/permission";
|
||||
|
||||
/** 销售订单 列表 */
|
||||
defineOptions({name: 'SaleOrder'})
|
||||
defineOptions({ name: 'SaleOrder' })
|
||||
|
||||
const {currentRoute, push} = useRouter() // 路由跳转
|
||||
const { currentRoute, push } = useRouter() // 路由跳转
|
||||
const message = useMessage() // 消息弹窗
|
||||
const {t} = useI18n() // 国际化
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<SaleOrderVO[]>([]) // 列表的数据
|
||||
|
|
@ -337,22 +324,22 @@ const total = ref(0) // 列表的总页数
|
|||
// tabs 数据
|
||||
const tabsData = ref([
|
||||
{
|
||||
name: '全部 ',
|
||||
name: t('billlist.all')+' ',
|
||||
type: 'All',
|
||||
count: 0
|
||||
},
|
||||
{
|
||||
name: '待审核',
|
||||
name: t('billlist.waitAudit'),
|
||||
type: 'B',
|
||||
count: 0
|
||||
},
|
||||
{
|
||||
name: '待排产',
|
||||
name: t('billlist.waitArrange'),
|
||||
type: 'C',
|
||||
count: 0
|
||||
},
|
||||
{
|
||||
name: '已排产',
|
||||
name: t('billlist.planned'),
|
||||
type: 'E',
|
||||
count: 0
|
||||
}
|
||||
|
|
@ -402,9 +389,9 @@ const getTabsCount = async () => {
|
|||
const res = await SaleOrderApi.getTabsCount()
|
||||
for (let objName in res) {
|
||||
let data = tabsData.value
|
||||
for (let obj in data) {
|
||||
for (let obj in data){
|
||||
let tabsType = tabsData.value[Number(obj)].type;
|
||||
if (tabsType == objName) {
|
||||
if(tabsType == objName){
|
||||
tabsData.value[Number(obj)].count = res[objName]
|
||||
}
|
||||
}
|
||||
|
|
@ -440,8 +427,7 @@ const handleDelete = async (id: number) => {
|
|||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -450,8 +436,8 @@ const handleReject = async () => {
|
|||
const ids = selectionList.value.map((item) => item.id)
|
||||
const billStatus = selectionList.value.map((item) => item.billStatus)
|
||||
debugger
|
||||
for (let vals of billStatus) {
|
||||
if (vals != 'B') {
|
||||
for(let vals of billStatus) {
|
||||
if(vals!='B'){
|
||||
message.error("请选择订单状态待审核的数据行");
|
||||
return;
|
||||
}
|
||||
|
|
@ -465,19 +451,19 @@ const handleUpdateBillStatus = async (operateKey: string) => {
|
|||
try {
|
||||
const ids = selectionList.value.map((item) => item.id)
|
||||
const billStatus = selectionList.value.map((item) => item.billStatus)
|
||||
for (let vals of billStatus) {
|
||||
if ("submit" == operateKey && vals != 'AA') {
|
||||
for(let vals of billStatus) {
|
||||
if("submit" == operateKey && vals!='AA'){
|
||||
message.error("请选择订单状态驳回的数据行");
|
||||
return;
|
||||
}
|
||||
if ("audit" == operateKey && vals != 'B') {
|
||||
if("audit" == operateKey && vals!='B'){
|
||||
message.error("请选择订单状态待审核的数据行");
|
||||
return;
|
||||
}
|
||||
if ("invalid" == operateKey) {
|
||||
if ((vals == 'C') || (vals == 'E')) {
|
||||
if("invalid" == operateKey){
|
||||
if((vals=='C') || (vals=='E')){
|
||||
message.error("单据已审核不允许作废");
|
||||
} else if (vals == 'D') {
|
||||
}else if(vals=='D'){
|
||||
message.error("单据已作废");
|
||||
}
|
||||
return;
|
||||
|
|
@ -486,13 +472,13 @@ const handleUpdateBillStatus = async (operateKey: string) => {
|
|||
debugger
|
||||
// 审批的二次确认
|
||||
let operateName = ''
|
||||
if (operateKey === 'submit') {
|
||||
if(operateKey === 'submit'){
|
||||
operateName = '提交'
|
||||
} else if (operateKey === "audit") {
|
||||
}else if(operateKey === "audit"){
|
||||
operateName = '审核'
|
||||
} else if (operateKey === "invalid") {
|
||||
}else if(operateKey === "invalid"){
|
||||
operateName = '作废'
|
||||
} else {
|
||||
}else {
|
||||
return
|
||||
}
|
||||
await message.confirm(`确定${operateName}该订单吗?`)
|
||||
|
|
@ -502,8 +488,7 @@ const handleUpdateBillStatus = async (operateKey: string) => {
|
|||
// 刷新列表
|
||||
await getList()
|
||||
selectionList.value = selectionList.value.filter((item) => !ids.includes(item.id))
|
||||
} catch {
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -512,8 +497,8 @@ const generateProduceOrder = async () => {
|
|||
try {
|
||||
const ids = selectionList.value.map((item) => item.id)
|
||||
const billStatus = selectionList.value.map((item) => item.billStatus)
|
||||
for (let vals of billStatus) {
|
||||
if (vals != 'C') {
|
||||
for(let vals of billStatus) {
|
||||
if(vals!='C'){
|
||||
message.error("请选择单据状态已审核的数据行");
|
||||
return;
|
||||
}
|
||||
|
|
@ -527,11 +512,11 @@ const generateProduceOrder = async () => {
|
|||
// 刷新列表
|
||||
await getList()
|
||||
selectionList.value = selectionList.value.filter((item) => !ids.includes(item.id))
|
||||
} catch {
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
|
|
@ -567,24 +552,24 @@ const submitRejectForm = async () => {
|
|||
const billStatus = selectionList.value.map((item) => item.billStatus)
|
||||
|
||||
|
||||
if (rejectform.rejectReason != null) {
|
||||
if(rejectform.rejectReason != null) {
|
||||
const data = {
|
||||
ids: ids,
|
||||
reason: rejectform.rejectReason
|
||||
ids:ids,
|
||||
reason:rejectform.rejectReason
|
||||
}
|
||||
await SaleOrderApi.rejectOrder(data).then(response => {
|
||||
message.success("驳回成功");
|
||||
rejectOpen.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
}else {
|
||||
message.error(`请填写驳回原因!`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** 驳回取消按钮 */
|
||||
const rejectCancel = () => {
|
||||
const rejectCancel = () =>{
|
||||
rejectOpen.value = false
|
||||
rejectform.rejectReason = undefined
|
||||
}
|
||||
|
|
@ -592,12 +577,12 @@ const rejectCancel = () => {
|
|||
|
||||
/** 订单编辑 */
|
||||
const openEdit = (id: number) => {
|
||||
push({name: 'SaleOrderEdit', params: {id}})
|
||||
push({ name: 'SaleOrderEdit', params: { id } })
|
||||
}
|
||||
|
||||
/** 查看订单详情 */
|
||||
const openDetail = (id: number) => {
|
||||
push({name: 'SaleOrderDetail', params: {id}})
|
||||
push({ name: 'SaleOrderDetail', params: { id } })
|
||||
}
|
||||
|
||||
const tableRowClassName = ({row, rowIndex}: {
|
||||
|
|
@ -636,7 +621,6 @@ onMounted(() => {
|
|||
.el-table .warning-row {
|
||||
--el-table-tr-bg-color: #D4D4D4;
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
--el-table-tr-bg-color: var(--el-color-success-light-9);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue