Commit c6bd2533 by liangjianmin

js

parent 4dfc73fb
...@@ -196,7 +196,7 @@ html, body, #app { ...@@ -196,7 +196,7 @@ html, body, #app {
height: 42px; height: 42px;
line-height: 42px; line-height: 42px;
text-align: center; text-align: center;
background: #1969F9; background: #A1ACC1;
border-radius: 2px; border-radius: 2px;
font-size: 20px; font-size: 20px;
color: #ffffff; color: #ffffff;
......
...@@ -163,7 +163,7 @@ body, ...@@ -163,7 +163,7 @@ body,
height: 42px; height: 42px;
line-height: 42px; line-height: 42px;
text-align: center; text-align: center;
background: #1969F9; background: #A1ACC1;
border-radius: 2px; border-radius: 2px;
font-size: 20px; font-size: 20px;
color: #ffffff; color: #ffffff;
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
</a> </a>
</div> </div>
<div class="user-box fr"> <div class="user-box fr">
<div class="line"></div> <!-- <div class="line"></div>
<a class="msgh fl" href="#"> <a class="msgh fl" href="#">
<span class="icon iconfont"></span> <span class="icon iconfont"></span>
<font>55</font> <font>55</font>
</a> </a>-->
<div class="line"></div> <div class="line"></div>
<a href="#" class="fl"><span class="icon iconfont fl"></span></a> <a href="#" class="fl"><span class="icon iconfont fl"></span></a>
<div class="line"></div> <div class="line"></div>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @param value * @param value
* @returns {string} * @returns {string}
*/ */
export const dateTimeFormate = (value, params) => { export const dateTimeFormate = (value) => {
var time = new Date(value * 1000); var time = new Date(value * 1000);
function timeAdd0(str) { function timeAdd0(str) {
...@@ -21,21 +21,3 @@ export const dateTimeFormate = (value, params) => { ...@@ -21,21 +21,3 @@ export const dateTimeFormate = (value, params) => {
var s = time.getSeconds(); var s = time.getSeconds();
return y + '-' + timeAdd0(m) + '-' + timeAdd0(d) + ' ' + timeAdd0(h) + ':' + timeAdd0(mm) + ':' + timeAdd0(s); return y + '-' + timeAdd0(m) + '-' + timeAdd0(d) + ' ' + timeAdd0(h) + ':' + timeAdd0(mm) + ':' + timeAdd0(s);
} }
export const dateTimeFormate1 = (value, params) => {
var time = new Date(value * 1000);
function timeAdd0(str) {
if (str < 10) {
str = '0' + str;
}
return str
}
var y = time.getFullYear();
var m = time.getMonth() + 1;
var d = time.getDate();
var h = time.getHours();
var mm = time.getMinutes();
var s = time.getSeconds();
return y + '-' + timeAdd0(m) + '-' + timeAdd0(d);
}
...@@ -31,17 +31,17 @@ ...@@ -31,17 +31,17 @@
<el-table-column prop="brand_name" label="品牌" min-width="10%"></el-table-column> <el-table-column prop="brand_name" label="品牌" min-width="10%"></el-table-column>
<el-table-column prop="inquiry_number" label="数量" min-width="10%"></el-table-column> <el-table-column prop="inquiry_number" label="数量" min-width="10%"></el-table-column>
<el-table-column prop="batch" label="批次" min-width="10%"></el-table-column> <el-table-column prop="batch" label="批次" min-width="10%"></el-table-column>
<el-table-column prop="create_time" label="交货日期" min-width="10%"></el-table-column> <el-table-column prop="delivery_time" label="交货日期" min-width="10%"></el-table-column>
<el-table-column prop="status_a" label="状态" min-width="10%"> <el-table-column prop="i_status" label="状态" min-width="10%">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status_a==1" class="f-green">已报价</span> <span v-if="scope.row.i_status==2" class="f-green">已报价</span>
<span v-else-if="scope.row.status_a==2" class="f-yellow1">处理中</span> <span v-else-if="scope.row.i_status==1" class="f-yellow1">待报价</span>
<span v-else-if="scope.row.status_a==3">已处理</span> <span v-else-if="scope.row.i_status==9">已删除</span>
<span v-else-if="scope.row.status_a==4" class="f-red1">其他失败</span> <span v-else-if="scope.row.i_status==-1" class="f-red1">已关闭</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="quote_count" label="报价数" min-width="10%"></el-table-column> <el-table-column prop="quote_num" label="报价数" min-width="10%"></el-table-column>
<el-table-column prop="create_time" label="报价时间" min-width="10%"></el-table-column> <el-table-column prop="create_time" label="报价时间" min-width="10%" :formatter='dateFormat'></el-table-column>
</el-table> </el-table>
<el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total" @current-change="handleCurrentChange" :current-page="page"></el-pagination> <el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total" @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</div> </div>
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import Menu from "@/components/menu.vue"; import Menu from "@/components/menu.vue";
import {dateTimeFormate} from "../../filters/formate.js";
import { import {
Form, Form,
FormItem, FormItem,
...@@ -124,7 +125,11 @@ ...@@ -124,7 +125,11 @@
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
detail(){ dateFormat(row, column) {
let date = row.create_time;
return dateTimeFormate(date);
},
detail() {
var arr = []; var arr = [];
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条询价信息"); Message("请至少选择一条询价信息");
...@@ -136,10 +141,6 @@ ...@@ -136,10 +141,6 @@
Message("请选择一条询价信息"); Message("请选择一条询价信息");
return; return;
} }
}, },
exportChange() { exportChange() {
var arr = []; var arr = [];
...@@ -152,15 +153,8 @@ ...@@ -152,15 +153,8 @@
arr.push(this.multipleSelection[i]['id']) arr.push(this.multipleSelection[i]['id'])
} }
this.$http('get', "/api/inquiry/export", { window.location.href = '/api/inquiry/export?ids=' + arr.join(",");
ids: arr.join(",")
}).then(res => {
if (res.err_code === 0) {
Message("导出成功");
} else {
Message(res.err_msg);
}
})
}, },
del() { del() {
...@@ -171,7 +165,7 @@ ...@@ -171,7 +165,7 @@
} }
for (var i = 0; i < this.multipleSelection.length; i++) { for (var i = 0; i < this.multipleSelection.length; i++) {
arr.push(this.multipleSelection[i]['id']) arr.push(this.multipleSelection[i]['supplier_auto_inquiry_id'])
} }
MessageBox.confirm('确认到删除当前勾选数据吗?', { MessageBox.confirm('确认到删除当前勾选数据吗?', {
type: 'error' type: 'error'
......
...@@ -42,25 +42,27 @@ ...@@ -42,25 +42,27 @@
<el-table-column prop="inquiry_sn" label="询价单号" width="200"></el-table-column> <el-table-column prop="inquiry_sn" label="询价单号" width="200"></el-table-column>
<el-table-column prop="quote_goods_name" label="报价型号" width="200"></el-table-column> <el-table-column prop="quote_goods_name" label="报价型号" width="200"></el-table-column>
<el-table-column prop="quote_brand_name" label="报价品牌" width="200"></el-table-column> <el-table-column prop="quote_brand_name" label="报价品牌" width="200"></el-table-column>
<el-table-column prop="status_a" label="状态" width="100"> <el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status==1" class="f-green">已报价</span> <span v-if="scope.row.status==1" class="f-green">已报价</span>
<span v-else-if="scope.row.status==2" class="f-yellow1">处理中</span> <span v-else-if="scope.row.status==2" class="f-yellow1">已选中</span>
<span v-else-if="scope.row.status==3">已处理</span> <span v-else-if="scope.row.status==3">已确认</span>
<span v-else-if="scope.row.status==4" class="f-red1">其他失败</span> <span v-else-if="scope.row.status==5" class="f-red1">已关闭</span>
<span v-else-if="scope.row.status==9" class="f-red1">已删除</span>
<span v-else-if="scope.row.status==-1" class="f-red1">已撤销</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="是否有效" width="100"></el-table-column> <el-table-column prop="expire_status_val" label="是否有效" width="100"></el-table-column>
<el-table-column prop="quote_number" label="报价数量" width="100"></el-table-column> <el-table-column prop="quote_number" label="报价数量" width="100"></el-table-column>
<el-table-column prop="price_origin" label="价格" width="200"></el-table-column> <el-table-column prop="price_origin" label="价格" width="200"></el-table-column>
<el-table-column prop="currency_val" label="币种" width="100"></el-table-column> <el-table-column prop="currency_val" label="币种" width="100"></el-table-column>
<el-table-column prop="" label="税率" width="100"></el-table-column> <el-table-column prop="tax_rate" label="税率" width="100"></el-table-column>
<el-table-column prop="batch" label="批次" width="100"></el-table-column> <el-table-column prop="batch" label="批次" width="100"></el-table-column>
<el-table-column prop="delivery_time" label="货期" width="100"></el-table-column> <el-table-column prop="delivery_time" label="货期" width="100"></el-table-column>
<el-table-column prop="" label="最小包装数量" width="150"></el-table-column> <el-table-column prop="mpq" label="最小包装数量" width="150"></el-table-column>
<el-table-column prop="" label="起订量" width="100"></el-table-column> <el-table-column prop="moq" label="起订量" width="100"></el-table-column>
<el-table-column prop="price_other" label="其他费用" width="100"></el-table-column> <el-table-column prop="price_other" label="其他费用" width="100"></el-table-column>
<el-table-column prop="effect_days" label="报价有效期" width="200"></el-table-column> <el-table-column prop="expire_time" label="报价有效期" width="200"></el-table-column>
<el-table-column prop="remark" label="备注" width="200"></el-table-column> <el-table-column prop="remark" label="备注" width="200"></el-table-column>
<el-table-column prop="create_time" label="最近报价时间" width="200"></el-table-column> <el-table-column prop="create_time" label="最近报价时间" width="200"></el-table-column>
</el-table> </el-table>
...@@ -100,7 +102,7 @@ ...@@ -100,7 +102,7 @@
data() { data() {
return { return {
total: 0, total: 0,
limit: 1, limit: 10,
page: 1, page: 1,
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
...@@ -128,7 +130,7 @@ ...@@ -128,7 +130,7 @@
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total = res.data.count || 3; this.total = res.data.total;
} else { } else {
Message(res.err_msg); Message(res.err_msg);
} }
...@@ -156,15 +158,7 @@ ...@@ -156,15 +158,7 @@
arr.push(this.multipleSelection[i]['id']) arr.push(this.multipleSelection[i]['id'])
} }
this.$http('get', "/api/inquiry/export", { window.location.href = '/api/quote/export?ids=' + arr.join(",");
ids: arr.join(",")
}).then(res => {
if (res.err_code === 0) {
Message("导出成功");
} else {
Message(res.err_msg);
}
})
}, },
close() { close() {
...@@ -182,7 +176,7 @@ ...@@ -182,7 +176,7 @@
ids: arr.join(",") ids: arr.join(",")
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("删除成功"); Message("关闭成功");
this.getData(); this.getData();
} else { } else {
Message(res.err_msg); Message(res.err_msg);
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
errorClass1: false, errorClass1: false,
errorClass2: false, errorClass2: false,
errorClass3: false, errorClass3: false,
cp: false,
form: { form: {
mobile: '', mobile: '',
password: '', password: '',
...@@ -84,13 +85,17 @@ ...@@ -84,13 +85,17 @@
let obj = newV; let obj = newV;
let myreg = /^[1][3,4,5,7,8][0-9]{9}$/; let myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
if (!this.cp) {
if (obj.captcha || obj.password || obj.mobile) { if (obj.captcha || obj.password || obj.mobile) {
this.errror_text = ''; this.errror_text = '';
this.errorClass1 = false; this.errorClass1 = false;
this.errorClass2 = false; this.errorClass2 = false;
this.errorClass3 = false; this.errorClass3 = false;
} }
} else {
this.cp = false;
}
if (myreg.test(obj.mobile)) { if (myreg.test(obj.mobile)) {
this.active = true; this.active = true;
...@@ -107,8 +112,10 @@ ...@@ -107,8 +112,10 @@
methods: { methods: {
updateCp() { updateCp() {
this.$http('get', "/auth/cp").then(res => { this.$http('get', "/auth/cp").then(res => {
if (res.err_code === 0) {
this.imgSrc = res.data.url.img; this.imgSrc = res.data.url.img;
this.form.captcha_key = res.data.url.key; this.form.captcha_key = res.data.url.key;
}
}).catch(err => { }).catch(err => {
console.log(err.message); console.log(err.message);
}) })
...@@ -153,7 +160,6 @@ ...@@ -153,7 +160,6 @@
loadingInstance.close(); loadingInstance.close();
if (res.err_code === 0) { if (res.err_code === 0) {
Util.setCookie("token", res.data.api_token, 1); Util.setCookie("token", res.data.api_token, 1);
console.log(this.$route.query.referer)
if (this.$route.query.referer) { if (this.$route.query.referer) {
window.location.href = "/#" + this.$route.query.referer window.location.href = "/#" + this.$route.query.referer
} else { } else {
...@@ -162,6 +168,7 @@ ...@@ -162,6 +168,7 @@
} else if (res.err_code === 102) { } else if (res.err_code === 102) {
this.errror_text = res.err_msg; this.errror_text = res.err_msg;
this.errorClass3 = true; this.errorClass3 = true;
this.cp = true;
this.updateCp(); this.updateCp();
} else { } else {
this.errror_text = res.err_msg; this.errror_text = res.err_msg;
......
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