|
@@ -8,14 +8,13 @@
|
|
v-show="showSearch"
|
|
v-show="showSearch"
|
|
label-width="100px"
|
|
label-width="100px"
|
|
>
|
|
>
|
|
-
|
|
|
|
<el-form-item label="媒体" prop="categoryId">
|
|
<el-form-item label="媒体" prop="categoryId">
|
|
<el-select
|
|
<el-select
|
|
filterable
|
|
filterable
|
|
v-model="queryParams.mediaId"
|
|
v-model="queryParams.mediaId"
|
|
placeholder="选择媒体"
|
|
placeholder="选择媒体"
|
|
clearable
|
|
clearable
|
|
- style="width: 120px"
|
|
|
|
|
|
+ style="width: 240px"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in queryParamsList.mediaList"
|
|
v-for="item in queryParamsList.mediaList"
|
|
@@ -26,7 +25,6 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
-
|
|
|
|
<el-form-item label="商品名称" prop="itemTitle">
|
|
<el-form-item label="商品名称" prop="itemTitle">
|
|
<el-input
|
|
<el-input
|
|
placeholder="请输入商品名称"
|
|
placeholder="请输入商品名称"
|
|
@@ -59,6 +57,21 @@
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item label="选择日期">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="uploadDate"
|
|
|
|
+ style="width: 240px"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ format="yyyy-MM-dd"
|
|
|
|
+ type="daterange"
|
|
|
|
+ range-separator="-"
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
+ ></el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
|
>搜索
|
|
>搜索
|
|
@@ -150,6 +163,30 @@
|
|
{{ scope.row.mediaName }}
|
|
{{ scope.row.mediaName }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+
|
|
|
|
+ <el-table-column label="预售" align="center" prop="isPresale" width="80">
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <font v-if="scope.row.isPresale == 2">
|
|
|
|
+ 是
|
|
|
|
+ </font>
|
|
|
|
+
|
|
|
|
+ <font v-if="scope.row.isPresale == 1">
|
|
|
|
+ 否
|
|
|
|
+ </font>
|
|
|
|
+
|
|
|
|
+ <el-button v-if="scope.row.isPresale != 1 && scope.row.isPresale != 2" size="mini" type="text"
|
|
|
|
+ @click="updateIsPresale(scope.row)"
|
|
|
|
+ >设置
|
|
|
|
+ </el-button>
|
|
|
|
+
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+
|
|
<el-table-column
|
|
<el-table-column
|
|
label="关联商品"
|
|
label="关联商品"
|
|
align="center"
|
|
align="center"
|
|
@@ -453,7 +490,13 @@
|
|
<el-radio-button label="1">抖音</el-radio-button>
|
|
<el-radio-button label="1">抖音</el-radio-button>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
-
|
|
|
|
|
|
+ <el-form-item label="是否预售" prop="isPresale" v-if="this.mediaId == '2'" class="entire-line"
|
|
|
|
+ style="width: 100%">
|
|
|
|
+ <el-radio-group v-model="isPresale">
|
|
|
|
+ <el-radio-button label=1>否</el-radio-button>
|
|
|
|
+ <el-radio-button label=2>是</el-radio-button>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
|
|
<el-form-item label="商品类型" prop="byteDanceItemType" v-if="this.mediaId == '1'" class="entire-line"
|
|
<el-form-item label="商品类型" prop="byteDanceItemType" v-if="this.mediaId == '1'" class="entire-line"
|
|
style="width: 100%">
|
|
style="width: 100%">
|
|
@@ -708,6 +751,35 @@
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="是否预售"
|
|
|
|
+ :visible.sync="updateIsPresaleVisible"
|
|
|
|
+ width="500px"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ >
|
|
|
|
+ <el-radio-group v-model="updateIsPresaleValue">
|
|
|
|
+ <el-radio-button label=1>否</el-radio-button>
|
|
|
|
+ <el-radio-button label=2>是</el-radio-button>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="submitUpdateIsPresale" :loading="refuseLoading"
|
|
|
|
+ >确 定
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ @click="
|
|
|
|
+ refuseLoading = false;
|
|
|
|
+ updateIsPresaleVisible = false;
|
|
|
|
+ updateIsPresaleValue = null;
|
|
|
|
+ "
|
|
|
|
+ >取 消
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+
|
|
<!-- 关联商品列表 -->
|
|
<!-- 关联商品列表 -->
|
|
<el-dialog title="关联商品列表" :visible.sync="associationListVisible" width="800px">
|
|
<el-dialog title="关联商品列表" :visible.sync="associationListVisible" width="800px">
|
|
<el-table :data="associationList" style="width: 100%">
|
|
<el-table :data="associationList" style="width: 100%">
|
|
@@ -834,7 +906,7 @@ import {
|
|
getRuleDetailByRuleId,
|
|
getRuleDetailByRuleId,
|
|
editRuleIdByItemId,
|
|
editRuleIdByItemId,
|
|
removeRelateByItemId,
|
|
removeRelateByItemId,
|
|
- getDataOwnership, checkUser,
|
|
|
|
|
|
+ getDataOwnership, checkUser, updateIsPresaleByItemId,
|
|
} from "@/api/goodsManagement/goods";
|
|
} from "@/api/goodsManagement/goods";
|
|
import selectTree from "./selectTree.vue";
|
|
import selectTree from "./selectTree.vue";
|
|
import textEditor from "./textEditor.vue";
|
|
import textEditor from "./textEditor.vue";
|
|
@@ -849,7 +921,7 @@ export default {
|
|
const equalToPassword = (rule, value, callback) => {
|
|
const equalToPassword = (rule, value, callback) => {
|
|
if (!!value && !this.edit) {
|
|
if (!!value && !this.edit) {
|
|
|
|
|
|
- checkItem({itemId: value, targetOwnershipId: this.formBroadcast.dataOwnership})
|
|
|
|
|
|
+ checkItem({itemId: value, targetOwnershipId: this.formBroadcast.dataOwnership, mediaId: this.mediaId})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
callback();
|
|
callback();
|
|
@@ -886,6 +958,9 @@ export default {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
return {
|
|
return {
|
|
|
|
+ uploadDate: [],
|
|
|
|
+ updateIsPresaleValue: 1,
|
|
|
|
+ isPresale: 0,
|
|
mediaId: "2",
|
|
mediaId: "2",
|
|
byteDanceItemType: "2",
|
|
byteDanceItemType: "2",
|
|
// 遮罩层
|
|
// 遮罩层
|
|
@@ -1016,6 +1091,13 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+
|
|
|
|
+ isPresale: {
|
|
|
|
+ required: false,
|
|
|
|
+ message: "是否预售必选",
|
|
|
|
+ trigger: "blur",
|
|
|
|
+ },
|
|
|
|
+
|
|
postArea: {
|
|
postArea: {
|
|
required: true,
|
|
required: true,
|
|
message: "发货地必选",
|
|
message: "发货地必选",
|
|
@@ -1114,7 +1196,9 @@ export default {
|
|
refuseLoading: false,
|
|
refuseLoading: false,
|
|
refuseInfo: null,
|
|
refuseInfo: null,
|
|
itemId: null,
|
|
itemId: null,
|
|
|
|
+ updateIsPresaleItemId: null,
|
|
associationVisible: false,
|
|
associationVisible: false,
|
|
|
|
+ updateIsPresaleVisible: false,
|
|
relateId: null,
|
|
relateId: null,
|
|
associationListVisible: false,
|
|
associationListVisible: false,
|
|
associationList: null,
|
|
associationList: null,
|
|
@@ -1185,6 +1269,12 @@ export default {
|
|
this.associationVisible = true;
|
|
this.associationVisible = true;
|
|
this.relateId = item.relateId;
|
|
this.relateId = item.relateId;
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ updateIsPresale(item) {
|
|
|
|
+ this.updateIsPresaleVisible = true;
|
|
|
|
+ this.updateIsPresaleItemId = item.itemId;
|
|
|
|
+ },
|
|
submitAssociation() {
|
|
submitAssociation() {
|
|
if (!!this.refuseInfo) {
|
|
if (!!this.refuseInfo) {
|
|
this.refuseLoading = true;
|
|
this.refuseLoading = true;
|
|
@@ -1205,6 +1295,27 @@ export default {
|
|
this.$message.error("请填写商品ID");
|
|
this.$message.error("请填写商品ID");
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ submitUpdateIsPresale() {
|
|
|
|
+ this.refuseLoading = true;
|
|
|
|
+ updateIsPresaleByItemId({
|
|
|
|
+ itemId: this.updateIsPresaleItemId,
|
|
|
|
+ isPresale: this.updateIsPresaleValue,
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.refuseLoading = false;
|
|
|
|
+ this.updateIsPresaleItemId = null;
|
|
|
|
+ this.updateIsPresaleVisible = false;
|
|
|
|
+ this.updateIsPresaleValue = null;
|
|
|
|
+ this.$message.success("修改成功");
|
|
|
|
+ this.updateIsPresaleValue = 1;
|
|
|
|
+ this.getList();
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.refuseLoading = false;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ },
|
|
getRowKeys(row) {
|
|
getRowKeys(row) {
|
|
return row.itemId;
|
|
return row.itemId;
|
|
},
|
|
},
|
|
@@ -1468,8 +1579,7 @@ export default {
|
|
/** 查询字典类型列表 */
|
|
/** 查询字典类型列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
-
|
|
|
|
- getItemList({userId: this.userId, ...this.queryParams}).then((response) => {
|
|
|
|
|
|
+ getItemList(this.addDateRange({userId: this.userId, ...this.queryParams}, this.uploadDate, "startDate", "endDate")).then((response) => {
|
|
this.typeList = response.rows;
|
|
this.typeList = response.rows;
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -1484,6 +1594,7 @@ export default {
|
|
// 表单重置
|
|
// 表单重置
|
|
reset() {
|
|
reset() {
|
|
this.form = {};
|
|
this.form = {};
|
|
|
|
+ this.uploadDate = [];
|
|
this.dateFile = null;
|
|
this.dateFile = null;
|
|
this.resetForm("formBroadcast");
|
|
this.resetForm("formBroadcast");
|
|
},
|
|
},
|
|
@@ -1496,6 +1607,7 @@ export default {
|
|
resetQuery() {
|
|
resetQuery() {
|
|
this.queryParams.mediaId = undefined;
|
|
this.queryParams.mediaId = undefined;
|
|
this.dateRange = [];
|
|
this.dateRange = [];
|
|
|
|
+ this.uploadDate = [];
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
},
|
|
},
|
|
@@ -1579,8 +1691,12 @@ export default {
|
|
params.mediaId = this.mediaId;
|
|
params.mediaId = this.mediaId;
|
|
params.byteDanceItemType = this.byteDanceItemType;
|
|
params.byteDanceItemType = this.byteDanceItemType;
|
|
params.examineStatus = 1;
|
|
params.examineStatus = 1;
|
|
|
|
+ params.isPresale = this.isPresale;
|
|
this.confirmLoading = false;
|
|
this.confirmLoading = false;
|
|
this.openAllocation = false;
|
|
this.openAllocation = false;
|
|
|
|
+ console.log("是否预售")
|
|
|
|
+ console.log(this.isPresale)
|
|
|
|
+ console.log(params)
|
|
localStorage.setItem("addItemInfo", JSON.stringify(params));
|
|
localStorage.setItem("addItemInfo", JSON.stringify(params));
|
|
this.$router.replace({
|
|
this.$router.replace({
|
|
path: "/goodsManagement/goodsPreview",
|
|
path: "/goodsManagement/goodsPreview",
|
|
@@ -1597,6 +1713,7 @@ export default {
|
|
params.commissionRate = params.commissionRate * 10;
|
|
params.commissionRate = params.commissionRate * 10;
|
|
params.mediaId = this.mediaId;
|
|
params.mediaId = this.mediaId;
|
|
params.byteDanceItemType = this.byteDanceItemType;
|
|
params.byteDanceItemType = this.byteDanceItemType;
|
|
|
|
+ params.isPresale = this.isPresale;
|
|
editItem(params)
|
|
editItem(params)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.confirmLoading = false;
|
|
this.confirmLoading = false;
|