Commit c6b70f7d by LJM

css

parent bd2c63a5
Showing with 20 additions and 11 deletions
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
<el-form-item label="更新日期" prop="date"> <el-form-item label="更新日期" prop="date">
<el-date-picker v-model="formParam.date" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> <el-date-picker v-model="formParam.date" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="过期时间" prop="date">
<el-date-picker v-model="cp_time_val" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit">搜索</el-button> <el-button type="primary" @click="onSubmit">搜索</el-button>
<el-button @click="resetForm('formParam')">重置</el-button> <el-button @click="resetForm('formParam')">重置</el-button>
...@@ -333,11 +336,13 @@ export default { ...@@ -333,11 +336,13 @@ export default {
dialogVisible2: false,//交期弹窗 dialogVisible2: false,//交期弹窗
dialogVisible3: false,//上架有效期 dialogVisible3: false,//上架有效期
downHref: "", downHref: "",
cp_time_val: '',
formParam: { formParam: {
goods_name: '', goods_name: '',
status: '', status: '',
brand_name: '', brand_name: '',
date: '' date: '',
cp_time: ''
}, },
multipleSelection: [], multipleSelection: [],
selectData: [], selectData: [],
...@@ -365,16 +370,20 @@ export default { ...@@ -365,16 +370,20 @@ export default {
* 获取数据 * 获取数据
*/ */
getData() { getData() {
this.$http('get', "/api/sku/list", { //格式化时间
page: this.page, if (this.cp_time_val) {
limit: this.limit, this.formParam.cp_time = this.cp_time_val[0] + '~' + this.cp_time_val[1];
goods_name: this.formParam.goods_name, } else {
status: this.formParam.status, this.formParam.cp_time = '';
brand_id: this.formParam.brand_id, }
brand_name: this.formParam.brand_name, var params = Object.assign({},
action_time: this.formParam.date ? this.formParam.date[0] : '', {page: this.page},
end_time: this.formParam.date ? this.formParam.date[1] : '' {limit: this.limit},
}).then(res => { this.formParam,
{taction_time: this.formParam.date ? this.formParam.date[0] : ''},
{end_time: this.formParam.date ? this.formParam.date[1] : ''})
this.$http('get', "/api/sku/list", params).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total = Number(res.data.count) || 0; this.total = Number(res.data.count) || 0;
......
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 sign in to comment