Commit a8576756 by 张立顺

fix bug

1 parent 0b2cecb5
......@@ -1651,13 +1651,13 @@ export const oaFlowPaymentStatusOpt = [
// 工单状态:0-待交付 1-准备交付 2-交付完成
export const orderStatusMap = [
{ confId: "-1", confValue: "已取消", color: "#FDB757" },
{ confId: "0", confValue: "待交付", color: "#FDB757" },
{ confId: 0, confValue: "待交付", color: "#FDB757" },
{ confId: "1", confValue: "交付中", color: "#FDB757" },
{ confId: "2", confValue: "交付完成", color: "#2CCA74" }
]
// 尾款支付状态:0-未支付 1-已结清
export const tailPayStatusMap = [
{ confId: "0", confValue: "未支付", color: "#FDB757" },
{ confId: 0, confValue: "待支付", color: "#FDB757" },
{ confId: "1", confValue: "已结清", color: "#2CCA74" }
]
......
......@@ -209,12 +209,12 @@ export const routerName = {
}
]
},
{
authId: "9200402",
parentId: "92004",
label: "状态变更",
handle: "handleChangeStatus"
},
// {
// authId: "9200402",
// parentId: "92004",
// label: "状态变更",
// handle: "handleChangeStatus"
// },
{
authId: "9200403",
parentId: "92004",
......
......@@ -5,9 +5,9 @@
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'120px'"
:search-select-obj="searchSelectObj" :form-data="showFormData">
<div class="input" slot="sourceNoInput">
<el-input clear v-model="searchSelectObj.sourceNo" placeholder="请输入来源单号" clearable :maxlength="20" @input="filterSourceNo"
@compositionstart="isComposing = true" @compositionend="handleCompositionEnd"></el-input>
<el-input clear v-model="searchSelectObj.sourceNo" placeholder="请输入来源单号" clearable :maxlength="20"
@input="filterSourceNo" @compositionstart="isComposing = true"
@compositionend="handleCompositionEnd"></el-input>
</div>
</d2-search>
<div class="up-btns">
......@@ -33,14 +33,14 @@
<div slot="orderStatusHtml" slot-scope="scope">
<div class="online-status">
<span class="dot" :style="{
background: baseData.orderStatusMap.find(
(item) => item.confId == scope.scope.orderStatus
).color
background: ((baseData.orderStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.orderStatus)
) || {}).color || ''
}"></span>
{{
baseData.orderStatusMap.find(
(item) => item.confId == scope.scope.orderStatus
).confValue
((baseData.orderStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.orderStatus)
) || {}).confValue || '--'
}}
</div>
</div>
......@@ -48,14 +48,14 @@
<div slot="tailPayStatusHtml" slot-scope="scope">
<div class="online-status">
<span class="dot" :style="{
background: baseData.tailPayStatusMap.find(
(item) => item.confId == scope.scope.paymentStatus
).color
background: ((baseData.tailPayStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.paymentStatus)
) || {}).color || ''
}"></span>
{{
baseData.tailPayStatusMap.find(
(item) => item.confId == scope.scope.paymentStatus
).confValue
((baseData.tailPayStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.paymentStatus)
) || {}).confValue || '--'
}}
</div>
</div>
......@@ -180,7 +180,7 @@ export default {
width: "160px"
},
{
label: "成交",
label: "成交时间",
prop: "transactionTime",
width: "160px"
},
......@@ -339,7 +339,7 @@ export default {
type: 'selectDatePicker',
selectName: 'divisionOrPayDate',
isClear: true,
itemStyle: "width: 90%;",
itemStyle: "width: 94%;",
selectWidth: "165px",
pickerOptions: 'rangePickerOptions',
selectOption: [{
......
......@@ -4,6 +4,11 @@
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData"
labelWidth="130px">
<div class="input" slot="sourceNoInput">
<el-input clear v-model="searchSelectObj.sourceNo" placeholder="请输入来源单号" clearable :maxlength="20"
@input="filterSourceNo" @compositionstart="isComposing = true"
@compositionend="handleCompositionEnd"></el-input>
</div>
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary" handle>
......@@ -118,10 +123,11 @@ export default {
},
{
label: "车源号",
name: "sourceNo",
type: "input",
isClear: true,
maxlength: 20
// name: "sourceNo",
// type: "input",
// isClear: true,
// maxlength: 20,
addHtml: 'sourceNoInput'
},
{
label: "车型",
......@@ -356,6 +362,26 @@ export default {
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
// 只允许英文字母/数字/ASCII 可见特殊字符(过滤中文及非 ASCII)
filterSourceNo(val) {
if (this.isComposing) return
const sanitized = (val || "").replace(/[^\x20-\x7E]/g, "")
const limited = sanitized.slice(0, 20)
if (val !== limited) {
this.searchSelectObj.sourceNo = limited
}
},
// 处理中文输入法组合输入结束后统一过滤
handleCompositionEnd() {
this.isComposing = false
const val = this.searchSelectObj.sourceNo || ""
const limited = val.replace(/[^\x20-\x7E]/g, "").slice(0, 20)
if (val !== limited) {
this.$nextTick(() => {
this.searchSelectObj.sourceNo = limited
})
}
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.$refs.vehicleManagementTable.refreshTable(true, true)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!