Commit 197d80c9 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'dev' into test

parents 6093ecf0 ff992552
...@@ -171,6 +171,7 @@ export const DICT_TYPE = { ...@@ -171,6 +171,7 @@ export const DICT_TYPE = {
// order // order
ORDER_TYPE: "order_type", // 订单类型 ORDER_TYPE: "order_type", // 订单类型
PRODUCT_RECORD_ATTRIBUTE: "product_record_attribute", //产品备案属性 PRODUCT_RECORD_ATTRIBUTE: "product_record_attribute", //产品备案属性
PROD_QUERY_TITLE_ZH_FIELD: 'prod_query_title_zh_field', // 商品列表商品中文名称查询类型
CONTROL_GOODS_STATUS: "control_goods_status", //控货状态 CONTROL_GOODS_STATUS: "control_goods_status", //控货状态
DISBURSEMENT_TYPE: "disbursement_type", //垫付类型 DISBURSEMENT_TYPE: "disbursement_type", //垫付类型
DRAWEE: "drawee", // 付款人 DRAWEE: "drawee", // 付款人
......
...@@ -29,13 +29,31 @@ ...@@ -29,13 +29,31 @@
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品名称')" prop="titleZh"> <!-- <el-form-item :label="$t('商品名称')" prop="titleZh">
<el-input <el-input
v-model="queryParams.titleZh" v-model="queryParams.titleZh"
:placeholder="$t('请输入商品名称')" :placeholder="$t('请输入商品名称')"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> -->
<el-form-item :label="$t('商品名称')" prop="titleZh">
<el-input
v-model.trim="titleZhParam.value"
:placeholder="$t('请输入商品名称')"
clearable
@keyup.enter.native="handleQuery"
>
<template slot="prepend">
<dict-selector
:type="DICT_TYPE.PROD_QUERY_TITLE_ZH_FIELD"
defaultable
v-model="titleZhParam.key"
class="w-50"
/>
</template>
</el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品类型')" prop="attrId"> <el-form-item :label="$t('商品类型')" prop="attrId">
...@@ -72,18 +90,71 @@ ...@@ -72,18 +90,71 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item :label="$t('审核状态')" prop="auditStatus">
<el-form-item :label="$t('商品材质')" prop="materialTypes">
<dict-selector
multiple
clearable
v-model="queryParams.materialTypes"
:type="DICT_TYPE.ECW_PRODUCT_MATERIAL"
></dict-selector>
</el-form-item>
<el-form-item :label="$t('审核状态')" prop="auditStatus">
<el-select v-model="queryParams.auditStatus" :placeholder="$t('选择审核状态')" clearable> <el-select v-model="queryParams.auditStatus" :placeholder="$t('选择审核状态')" clearable>
<el-option v-for="auditStatusItem in auditStatusDictDatas" :key="auditStatusItem.id" :label="auditStatusItem.label" :value="auditStatusItem.value" /> <el-option v-for="auditStatusItem in auditStatusDictDatas" :key="auditStatusItem.id" :label="auditStatusItem.label" :value="auditStatusItem.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('包装要求')" prop="packaging">
<dict-selector
clearable
v-model="queryParams.packaging"
:type="DICT_TYPE.ECW_PACKAGING_TYPE"
></dict-selector>
</el-form-item>
<!--
<el-form-item :label="$t('上架状态')" prop="status"> <el-form-item :label="$t('上架状态')" prop="status">
<el-select v-model="queryParams.status" :placeholder="$t('选择上架状态')" clearable> <el-select v-model="queryParams.status" :placeholder="$t('选择上架状态')" clearable>
<el-option v-for="statusItem in statusDictDatas" :key="statusItem.id" :label="statusItem.value == CommonStatusEnum.ENABLE ? '已上架' : '已下架'" :value="statusItem.value" /> <el-option v-for="statusItem in statusDictDatas" :key="statusItem.id" :label="statusItem.value == CommonStatusEnum.ENABLE ? '已上架' : '已下架'" :value="statusItem.value" />
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<el-form-item :label="$t('创建时间')">
<el-date-picker
v-model="dateRangeCreateTime"
type="datetimerange"
:start-placeholder="$t('开始日期')"
value-format="yyyy-MM-dd HH:mm:ss"
:end-placeholder="$t('结束日期')"
>
</el-date-picker>
</el-form-item>
<!-- <el-form-item :label="$t('创建时间')" v-show="showSearch">
<el-date-picker
type="datetimerange"
clearable
v-model="dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
/>
</el-form-item> -->
<el-form-item :label="$t('创建人')" prop="creator">
<el-input
v-model.trim="queryParams.creator"
:placeholder="$t('请输入创建人')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{
$t("搜索") $t("搜索")
...@@ -159,12 +230,25 @@ ...@@ -159,12 +230,25 @@
/> />
<el-table-column :label="$t('中文标题')" align="center" prop="titleZh" /> <el-table-column :label="$t('中文标题')" align="center" prop="titleZh" />
<el-table-column :label="$t('英文标题')" align="center" prop="titleEn" /> <el-table-column :label="$t('英文标题')" align="center" prop="titleEn" />
<el-table-column :label="$t('商品性')" align="center" prop="attrId"> <el-table-column :label="$t('商品性')" align="center" prop="attrId">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getAttrName(scope.row.attrId) }}</span> <span>{{ getAttrName(scope.row.attrId) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!--商品特性-->
<el-table-column :label="$t('商品材质')" align="center" prop="materialType">
<template slot-scope="scope">
<span>{{ getMaterialTypeName(scope.row.materialType) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('包装要求')" align="center" prop="packaging">
<template slot-scope="scope">
<span>{{ getPackagingName(scope.row.packaging) }}</span>
</template>
</el-table-column>
<!---->
<el-table-column :label="$t('商品图片')" align="center" prop="attrId"> <el-table-column :label="$t('商品图片')" align="center" prop="attrId">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image
...@@ -178,7 +262,7 @@ ...@@ -178,7 +262,7 @@
<el-table-column <el-table-column
prop="auditStatus" prop="auditStatus"
align="center" align="center"
:label="$t('是否审核')" :label="$t('审核状态')"
width="120" width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -197,12 +281,12 @@ ...@@ -197,12 +281,12 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:label="$t('添加人')" :label="$t('创建人')"
align="center" align="center"
prop="creatorName" prop="creatorName"
/> />
<el-table-column :label="$t('添加时间')" align="center"> <el-table-column :label="$t('创建时间')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
...@@ -281,7 +365,7 @@ ...@@ -281,7 +365,7 @@
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['ecw:product:update']">{{$t('修改')}}</el-button> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['ecw:product:update']">{{$t('修改')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['ecw:product:delete']">{{$t('删除')}}</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['ecw:product:delete']">{{$t('删除')}}</el-button>
</template> --> </template> -->
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -342,7 +426,7 @@ ...@@ -342,7 +426,7 @@
<image-upload v-model="form.imgs" /> <image-upload v-model="form.imgs" />
</el-form-item> </el-form-item>
<el-form-item prop="auditStatus" :label="$t('是否审核')"> <el-form-item prop="auditStatus" :label="$t('审核状态')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="form.auditStatus"> <el-select v-model="form.auditStatus">
<el-option <el-option
...@@ -608,6 +692,12 @@ export default { ...@@ -608,6 +692,12 @@ export default {
auditStatus: null, auditStatus: null,
status: null, status: null,
}, },
// 编号搜索条件
titleZhParam: {
key: "titleZhKey",
value: "",
},
// 表单参数 // 表单参数
form: {}, form: {},
formCopy: {}, formCopy: {},
...@@ -651,9 +741,10 @@ export default { ...@@ -651,9 +741,10 @@ export default {
CommonStatusEnum: CommonStatusEnum, CommonStatusEnum: CommonStatusEnum,
AuditStatusEnum: AuditStatusEnum, AuditStatusEnum: AuditStatusEnum,
statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS), statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
auditStatusDictDatas: getDictDatas(DICT_TYPE.AUDIT_STATUS), auditStatusDictDatas: getDictDatas(DICT_TYPE.AUDIT_STATUS),
materialList: getDictDatas(DICT_TYPE.ECW_PRODUCT_MATERIAL), materialList: getDictDatas(DICT_TYPE.ECW_PRODUCT_MATERIAL),
packagingList: getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE), packagingList: getDictDatas(DICT_TYPE.ECW_PACKAAGING_TYPE),
locationList: getDictDatas(DICT_TYPE.ECW_CONTAINER_LOCATION), locationList: getDictDatas(DICT_TYPE.ECW_CONTAINER_LOCATION),
preferentialList: [], preferentialList: [],
exceptionProductId: 0, //新增商品异常传的id exceptionProductId: 0, //新增商品异常传的id
...@@ -689,6 +780,32 @@ export default { ...@@ -689,6 +780,32 @@ export default {
return productAttrArray.join(","); return productAttrArray.join(",");
}; };
}, },
getPackagingName() {
return (packagingId) => {
for (let index in this.packagingList) {
let typeItem = this.packagingList[index];
if (typeItem.id == packagingId) {
return this.$l(typeItem, "title");
}
}
};
},
getMaterialTypeName() {
return (materialTypeId) => {
for (let index in this.materialList) {
let typeItem = this.materialList[index];
if (typeItem.id == materialTypeId) {
return this.$l(typeItem, "title");
}
}
};
},
firstImg() { firstImg() {
return (imgString) => { return (imgString) => {
if (!imgString || imgString == "") return imgString; if (!imgString || imgString == "") return imgString;
...@@ -844,10 +961,22 @@ export default { ...@@ -844,10 +961,22 @@ export default {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// 处理查询参数 // 处理查询参数
let params = { ...this.queryParams }; let params = { ...this.queryParams };
if (this.titleZhParam.value) {
params[this.titleZhParam.key] = this.titleZhParam.value;
}
params.filter = false; params.filter = false;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime"); // this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
this.addBeginAndEndTime(
params,
this.dateRangeCreateTime,
"createTime",
false
);
// 执行查询 // 执行查询
params.status = 0; params.status = 0;
getProductPage(params).then((response) => { getProductPage(params).then((response) => {
...@@ -891,7 +1020,10 @@ export default { ...@@ -891,7 +1020,10 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRangeCreateTime = []; this.dateRangeCreateTime = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.titleZhParam.value = "";
this.queryParams.materialTypes =[];
this.handleQuery(); this.handleQuery();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
...@@ -1018,7 +1150,13 @@ export default { ...@@ -1018,7 +1150,13 @@ export default {
let params = { ...this.queryParams }; let params = { ...this.queryParams };
params.pageNo = undefined; params.pageNo = undefined;
params.pageSize = undefined; params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime"); //this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
this.addBeginAndEndTime(
params,
this.dateRangeCreateTime,
"createTime",
false
);
// 执行导出 // 执行导出
this.$modal this.$modal
.confirm(this.$t("是否确认导出所有商品数据项?")) .confirm(this.$t("是否确认导出所有商品数据项?"))
......
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