Commit b3bafc9e authored by wux's avatar wux

Merge remote-tracking branch 'origin/jd_dev' into jd_dev

parents 738dc2e3 9ba87418
<template> <template>
<div v-if="!item.hidden"> <div v-if="!item.hidden">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"> <template v-if="hasOneShowingChild(item.children, item) && (!onlyOneChild.children || onlyOneChild.noShowingChildren) && !item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)"> <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{ 'submenu-title-noDropdown': !isNest }">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="$l(onlyOneChild.meta, 'title')" :badge="badge" /> <item :icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)" :title="$l(onlyOneChild.meta, 'title')" :badge="badge" />
</el-menu-item> </el-menu-item>
</app-link> </app-link>
</template> </template>
...@@ -12,27 +12,20 @@ ...@@ -12,27 +12,20 @@
<template slot="title"> <template slot="title">
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="$l(item.meta, 'title')" :badge="badge" /> <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="$l(item.meta, 'title')" :badge="badge" />
</template> </template>
<sidebar-item <sidebar-item v-for="(child, index) in item.children" :key="index" :is-nest="true" :item="child" :base-path="resolvePath(child.path)" class="nest-menu" />
v-for="child in item.children"
:key="child.path"
:is-nest="true"
:item="child"
:base-path="resolvePath(child.path)"
class="nest-menu"
/>
</el-submenu> </el-submenu>
</div> </div>
</template> </template>
<script> <script>
import path from 'path' import path from "path"
import { isExternal } from '@/utils/validate' import { isExternal } from "@/utils/validate"
import Item from './Item' import Item from "./Item"
import AppLink from './Link' import AppLink from "./Link"
import FixiOSBug from './FixiOSBug' import FixiOSBug from "./FixiOSBug"
export default { export default {
name: 'SidebarItem', name: "SidebarItem",
components: { Item, AppLink }, components: { Item, AppLink },
mixins: [FixiOSBug], mixins: [FixiOSBug],
props: { props: {
...@@ -47,24 +40,24 @@ export default { ...@@ -47,24 +40,24 @@ export default {
}, },
basePath: { basePath: {
type: String, type: String,
default: '' default: ""
} }
}, },
data() { data() {
this.onlyOneChild = null this.onlyOneChild = null
return {} return {}
}, },
computed:{ computed: {
badge(){ badge() {
return this.$store.getters.badgeData[this.item.meta?.badgeField] return this.$store.getters.badgeData[this.item.meta?.badgeField]
} }
}, },
methods: { methods: {
hasOneShowingChild(children = [], parent) { hasOneShowingChild(children = [], parent) {
if (!children) { if (!children) {
children = []; children = []
} }
const showingChildren = children.filter(item => { const showingChildren = children.filter((item) => {
if (item.hidden) { if (item.hidden) {
return false return false
} else { } else {
...@@ -81,7 +74,7 @@ export default { ...@@ -81,7 +74,7 @@ export default {
// Show parent if there are no child router to display // Show parent if there are no child router to display
if (showingChildren.length === 0) { if (showingChildren.length === 0) {
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true } this.onlyOneChild = { ...parent, path: "", noShowingChildren: true }
return true return true
} }
......
This diff is collapsed.
...@@ -164,8 +164,8 @@ ...@@ -164,8 +164,8 @@
<el-date-picker type="datetimerange" clearable v-model="firstDealTime" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" /> <el-date-picker type="datetimerange" clearable v-model="firstDealTime" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')" v-show="showSearch"> <el-form-item :label="$t('创建时间')">
<el-date-picker type="datetimerange" clearable v-model="dateRangeCreateTime" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" /> <el-date-picker type="datetimerange" clearable v-model="createTime" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item> </el-form-item>
<el-form-item style="padding-left: 20px"> <el-form-item style="padding-left: 20px">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
...@@ -794,7 +794,6 @@ export default { ...@@ -794,7 +794,6 @@ export default {
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
dateRangeCreateTime: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
...@@ -890,6 +889,7 @@ export default { ...@@ -890,6 +889,7 @@ export default {
enterOpenSeaTime: [], enterOpenSeaTime: [],
customerServiceConfirmedTime: [], customerServiceConfirmedTime: [],
firstDealTime: [], firstDealTime: [],
createTime: [],
customerSelect: [], customerSelect: [],
recommended: [], recommended: [],
getNodeLists: [], getNodeLists: [],
...@@ -966,14 +966,14 @@ export default { ...@@ -966,14 +966,14 @@ export default {
queryParams.beginCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[0] queryParams.beginCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[0]
queryParams.endCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[1] queryParams.endCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[1]
} }
if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) {
queryParams.beginCreateTime = this.dateRangeCreateTime[0]
queryParams.endCreateTime = this.dateRangeCreateTime[1]
}
if (this.firstDealTime && this.firstDealTime.length == 2) { if (this.firstDealTime && this.firstDealTime.length == 2) {
queryParams.beginFirstDealTime = this.firstDealTime[0] queryParams.beginFirstDealTime = this.firstDealTime[0]
queryParams.endFirstDealTime = this.firstDealTime[1] queryParams.endFirstDealTime = this.firstDealTime[1]
} }
if (this.createTime && this.createTime.length == 2) {
queryParams.beginCreateTime = this.createTime[0]
queryParams.endCreateTime = this.createTime[1]
}
if (this.weightYearly.value) { if (this.weightYearly.value) {
let key = "eqWeightYearly" let key = "eqWeightYearly"
if (this.weightYearly.key == "leNumberKey") { if (this.weightYearly.key == "leNumberKey") {
...@@ -1006,10 +1006,13 @@ export default { ...@@ -1006,10 +1006,13 @@ export default {
}, },
created() { created() {
console.log("created") console.log("created")
getCreditPage({ page: 1, rows: 999 }).then((r) => { getCreditPage({ page: 1, rows: 999 }).then((r) => {
this.creditList = r.data.list this.creditList = r.data.list
}) })
this.getList() // 获取当前时间的年份开始时间与结束时间值,并赋值给创建时间,再查询当年创建的客户
this.getCurrentYearList()
// this.getList()
listServiceUser().then((r) => { listServiceUser().then((r) => {
this.customerServiceList = r.data this.customerServiceList = r.data
}) })
...@@ -1062,6 +1065,17 @@ export default { ...@@ -1062,6 +1065,17 @@ export default {
}) })
} }
}, },
getCurrentYearList(){
const today = new Date();
const targetday_milliseconds = today.getTime();
today.setTime(targetday_milliseconds); //注意,这行是关键代码
const tYear = today.getFullYear();
console.log("年份:", tYear)
if (tYear){
this.createTime = [(tYear + "-01-01 00:00:00"),(tYear + "-12-31 23:59:59")]
}
this.getList()
},
//合并客户 //合并客户
handleMergeCus() { handleMergeCus() {
this.customerMergeVisible = true this.customerMergeVisible = true
...@@ -1170,12 +1184,7 @@ export default { ...@@ -1170,12 +1184,7 @@ export default {
this.loading = true this.loading = true
// 处理查询参数} // 处理查询参数}
let params = { ...this.queryParams, ...this.combinedQueryParams } let params = { ...this.queryParams, ...this.combinedQueryParams }
/*this.addBeginAndEndTime(
params,
this.dateRangeCreateTime,
"createTime",
false
);*/
// 执行查询 // 执行查询
switch (this.$route.path) { switch (this.$route.path) {
case "/customer/customer": case "/customer/customer":
...@@ -1344,10 +1353,10 @@ export default { ...@@ -1344,10 +1353,10 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRangeCreateTime = []
this.enterOpenSeaTime = [] this.enterOpenSeaTime = []
this.customerServiceConfirmedTime = [] this.customerServiceConfirmedTime = []
this.firstDealTime = [] this.firstDealTime = []
this.createTime = []
this.resetForm("queryForm") this.resetForm("queryForm")
this.queryParams = { this.queryParams = {
pageNo: 1, pageNo: 1,
......
...@@ -1873,10 +1873,10 @@ export default { ...@@ -1873,10 +1873,10 @@ export default {
// 校验手机号跟目的国是否匹配 // 校验手机号跟目的国是否匹配
if (this.hasConsignee && this.form.consigneeCountryCode && this.form.consigneePhone) { if (this.hasConsignee && this.form.consigneeCountryCode && this.form.consigneePhone) {
if (this.form.consigneeCountryCode == "86" || this.form.consigneeCountryCode == "+86") { // if (this.form.consigneeCountryCode == "86" || this.form.consigneeCountryCode == "+86") {
this.$message.error(this.$t("控货订单的收货人手机号不能是国内号码")) // this.$message.error(this.$t("控货订单的收货人手机号不能是国内号码"))
return // return
} // }
const res = await checkCountryCode({ const res = await checkCountryCode({
areaCode: this.form.consigneeCountryCode, areaCode: this.form.consigneeCountryCode,
currencyId: this.form.destCountryId currencyId: this.form.destCountryId
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
<!-- <el-form-item :label="$t('唛头')" prop="marks"> <!-- <el-form-item :label="$t('唛头')" prop="marks">
<el-input v-model="queryParams.marks" :placeholder="$t('唛头')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.marks" :placeholder="$t('唛头')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> --> </el-form-item> -->
<el-form-item :label="$t('发货人电话')" prop="consigneeKey"> <el-form-item :label="$t('发货人电话')" prop="consignorPhone">
<el-input v-model.trim="queryParams.consignorPhone" :placeholder="$t('发货人电话')" clearable @keyup.enter.native="handleQuery" class="w-200"/> <el-input v-model.trim="queryParams.consignorPhone" :placeholder="$t('发货人电话')" clearable @keyup.enter.native="handleQuery" @input="queryParams.consignorPhone = queryParams.consignorPhone.replace(/\s+/g, '')" class="w-200"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('收货人电话')" prop="consigneeKey"> <el-form-item :label="$t('收货人电话')" prop="consignorPhone">
<el-input v-model.trim="queryParams.consigneePhone" :placeholder="$t('收货人电话')" clearable @keyup.enter.native="handleQuery" class="w-200"/> <el-input v-model.trim="queryParams.consigneePhone" :placeholder="$t('收货人电话')" clearable @keyup.enter.native="handleQuery" @input="queryParams.consigneePhone = queryParams.consigneePhone.replace(/\s+/g, '')" class="w-200"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('控货')" prop="isCargoControl" v-show="showSearch"> <el-form-item :label="$t('控货')" prop="isCargoControl" v-show="showSearch">
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<!--出货订单编辑,shipmentState > 0表示出货后,inWarehouseState == 0 表示预装未审核或者是卸柜到仓 , shipmentState==307 表示已预装,待封柜, shipmentState==407 表示已预装,待封柜)--> <!--出货订单编辑,shipmentState > 0表示出货后,inWarehouseState == 0 表示预装未审核或者是卸柜到仓 , shipmentState==307 表示已预装,待封柜, shipmentState==407 表示已预装,待封柜)-->
<template <template
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 305 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407" v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && exclude(scope.row.shipmentState, [305, 307, 309, 310, 311, 313, 407,409,411])"
> >
<el-dropdown-item <el-dropdown-item
@click.native="handleUpdate(scope.row)" @click.native="handleUpdate(scope.row)"
...@@ -497,7 +497,7 @@ ...@@ -497,7 +497,7 @@
</template> </template>
<!-- 入仓补充 --> <!-- 入仓补充 -->
<template <template
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 305 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407" v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && exclude(scope.row.shipmentState, [305, 307, 309, 310, 311, 313, 407,409,411])"
> >
<el-dropdown-item <el-dropdown-item
@click.native="$router.push('/order/warehousing-add?shipment=1&id=' + scope.row.orderId)" @click.native="$router.push('/order/warehousing-add?shipment=1&id=' + scope.row.orderId)"
...@@ -525,7 +525,8 @@ ...@@ -525,7 +525,8 @@
</template> </template>
<!-- 入仓修改 --> <!-- 入仓修改 -->
<template <template
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 305 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407" v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0
&& exclude(scope.row.shipmentState, [305, 307, 309, 310, 311, 313, 407,409,411])"
> >
<el-dropdown-item <el-dropdown-item
@click.native="$router.push('/order/warehousing-update?shipment=1&id=' + scope.row.orderId)" @click.native="$router.push('/order/warehousing-update?shipment=1&id=' + scope.row.orderId)"
......
...@@ -92,9 +92,9 @@ ...@@ -92,9 +92,9 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('模板编号')" align="center" prop="templateId"> <el-table-column :label="$t('模板编号')" align="center" prop="templateId">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<router-link :to="`/system/sms/sms-template?apiTemplateId=${row.apiTemplateId}`" class="link-type"> <el-button size="mini" type="text" @click="look(row.templateId)">
{{ row.templateId }} {{ row.templateId }}
</router-link> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('短信类型')" align="center" prop="templateType"> <el-table-column :label="$t('短信类型')" align="center" prop="templateType">
...@@ -196,12 +196,80 @@ ...@@ -196,12 +196,80 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 预览模板 -->
<el-dialog :visible.sync="open2" width="500px" append-to-body>
<el-form label-width="140px">
<el-form-item :label="$t('短信渠道编号')" prop="channelId">
<el-select v-model="form2.channelId" :placeholder="$t('请选择短信渠道编号')">
<el-option v-for="channel in channelOptions"
:key="channel.id" :value="channel.id"
:label="channel.signature + '【' + getDictDataLabel(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, channel.code) + '】'" />
</el-select>
</el-form-item>
<el-form-item :label="$t('发送类型')" prop="messageType">
<el-select v-model="form2.messageType" placeholder="请选择发送类型">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_SMS_TEMPLATE_MESSAGE_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('短信类型')" prop="type">
<el-select v-model="form2.type" :placeholder="$t('请选择短信类型')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
<el-form-item label="节点" prop="nodeValue">
<el-select v-model="form2.nodeValue" placeholder="请选择节点类型">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_SMS_NODE_NODE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId">
<el-select v-model="form2.transportId" :placeholder="$t('请选择运输方式类型')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
<el-option key="0" label="无" :value="parseInt(0)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('模板编号')" prop="code">
<el-input v-model="form2.code" :placeholder="$t('请输入模板编号')" />
</el-form-item>
<el-form-item :label="$t('模板名称')" prop="name">
<el-input v-model="form2.name" :placeholder="$t('请输入模板名称')" />
</el-form-item>
<el-form-item :label="$t('开启状态')" prop="status">
<el-radio-group v-model="form2.status">
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="短信API模板编号" prop="apiTemplateId">
<el-input v-model="form2.apiTemplateId" placeholder="请输入短信 API 的模板编号" />
</el-form-item>
<el-form-item :label="$t('模板内容')" prop="content">
<el-input type="textarea" v-model="form2.content" :placeholder="$t('请输入模板内容')" />
</el-form-item>
<el-form-item :label="$t('备注')" prop="remark">
<el-input v-model="form2.remark" :placeholder="$t('请输入备注')" />
</el-form-item>
<el-form-item label="语言" prop="language">
<el-select v-model="form2.language" placeholder="请选择语言">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_SMS_TEMPLATE_LANGUAGE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getSmsLogPage, exportSmsLogExcel } from "@/api/system/sms/smsLog"; import { getSmsLogPage, exportSmsLogExcel } from "@/api/system/sms/smsLog";
import { getSimpleSmsChannels } from "@/api/system/sms/smsChannel"; import { getSimpleSmsChannels } from "@/api/system/sms/smsChannel";
import {getSmsTemplate} from '@/api/system/sms/smsTemplate'
export default { export default {
name: "SmsLog", name: "SmsLog",
...@@ -239,6 +307,8 @@ export default { ...@@ -239,6 +307,8 @@ export default {
}, },
// 短信渠道 // 短信渠道
channelOptions: [], channelOptions: [],
form2: {},
open2: false,
}; };
}, },
created() { created() {
...@@ -310,6 +380,12 @@ export default { ...@@ -310,6 +380,12 @@ export default {
} }
} }
return this.$t('找不到签名:') + channelId; return this.$t('找不到签名:') + channelId;
},
look(templateId) {
getSmsTemplate(templateId).then(response => {
this.form2 = response.data
this.open2 = true
});
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment