Commit 81be4b1e authored by 332784038@qq.com's avatar 332784038@qq.com

feature: 查询条件联调&查看代理商详情显示修改

parent a513489c
......@@ -15,7 +15,7 @@ import './permission' // permission control
import './tongji' // 百度统计
import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/infra/config";
import { parseTime, resetForm, addDateRange, addBeginAndEndTime, handleTree} from "@/utils/ruoyi";
import { parseTime, resetForm, addDateRange, addBeginAndEndTime, addBeginAndEndTimeNew, handleTree} from "@/utils/ruoyi";
import Pagination from "@/components/Pagination";
// 自定义表格工具扩展
import RightToolbar from "@/components/RightToolbar"
......@@ -33,6 +33,7 @@ Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.addBeginAndEndTime = addBeginAndEndTime
Vue.prototype.addBeginAndEndTimeNew = addBeginAndEndTimeNew
Vue.prototype.getDictDatas = getDictDatas
Vue.prototype.getDictDatas2 = getDictDatas2
Vue.prototype.getDictDataLabel = getDictDataLabel
......
......@@ -105,6 +105,31 @@ export function addBeginAndEndTime(params, dateRange, propName,isTime = true) {
return params;
}
export function addBeginAndEndTimeNew(params, dateRange, prefixName, propName, isTime = true) {
// 必须传入参数
if (!dateRange) {
return params;
}
// 如果未传递 propName 属性,默认为 time
if (!propName) {
propName = 'Time';
} else {
propName = propName.charAt(0).toUpperCase() + propName.slice(1);
}
if (!prefixName) {
prefixName = ''
}
console.log('dateRange', dateRange)
// 设置参数
if (dateRange[0]) {
params[prefixName + 'Begin' + propName] = dateRange[0] + (isTime ? ' 00:00:00':'');
}
if (dateRange[1]) {
params[prefixName + 'End' + propName] = dateRange[1] + (isTime ? ' 23:59:59' : '');
}
return params;
}
// 字符串格式化(%s )
export function sprintf(str) {
var args = arguments, flag = true, i = 1;
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@
<el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px">
<el-form-item :label="$t('代理商Agent')" prop="agentId">
<supplierOutSelect v-model="agentObj.agentId" :companyType="'1'" :areaType="1" :placeholder="$t('请选择代理商')" :allSupplier="this.$attrs.allSupplier" />
<el-button v-hasPermi="['ecw:supplier:query']" type="text" style="font-size: 13px; margin-left: 240px;" @click="SupplierDetail">{{$t('查看代理商详情')}}</el-button>
<el-button v-if="agentObj.agentId" v-hasPermi="['ecw:supplier:query']" type="text" style="font-size: 13px; margin-left: 240px;" @click="SupplierDetail">{{$t('查看代理商详情')}}</el-button>
</el-form-item>
</el-form>
<el-row class="operate-button">
......
......@@ -3,7 +3,7 @@
<el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px">
<el-form-item :label="$t('代理商Agent')" prop="agentId">
<supplierOutSelect v-model="agentObj.agentId" :companyType="'1'" :areaType="1" :placeholder="$t('请选择代理商')" :allSupplier="this.$attrs.allSupplier" />
<el-button v-hasPermi="['ecw:supplier:query']" type="text" style="font-size: 13px; margin-left: 240px;" @click="SupplierDetail">{{$t('查看代理商详情')}}</el-button>
<el-button v-hasPermi="['ecw:supplier:query']" v-if="agentObj.agentId" type="text" style="font-size: 13px; margin-left: 240px;" @click="SupplierDetail">{{$t('查看代理商详情')}}</el-button>
</el-form-item>
</el-form>
<el-row class="operate-button">
......
......@@ -43,8 +43,8 @@ export default {
(item) => item.areaType == this.areaType
);
if(this.areaType == 1 || !this.companyType) return allSupplier;
return allSupplier.filter((item) =>
item.companyTypes.includes(this.companyType)
return allSupplier?.filter((item) =>
item.companyTypes?.includes(this.companyType)
);
},
},
......
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