Commit 4936e1dd by liangjianmin

js

parent 5f081d86
Showing with 43 additions and 49 deletions
...@@ -6,27 +6,27 @@ ...@@ -6,27 +6,27 @@
<div class="fl"> <div class="fl">
<span class="p-text">型号</span> <span class="p-text">型号</span>
<input type="text" placeholder="" disabled :value="inquiry_info.goods_name" <input type="text" placeholder="" disabled :value="inquiry_info.goods_name"
style="width: 176px;margin-right: 30px; " /> style="width: 176px;margin-right: 30px; " />
</div> </div>
<div class="fl"> <div class="fl">
<span class="p-text">品牌</span> <span class="p-text">品牌</span>
<input type="text" placeholder="" disabled :value="inquiry_info.brand_name" <input type="text" placeholder="" disabled :value="inquiry_info.brand_name"
style="width: 100px;margin-right: 30px; " /> style="width: 100px;margin-right: 30px; " />
</div> </div>
<div class="fl"> <div class="fl">
<span class="p-text">数量</span> <span class="p-text">数量</span>
<input type="text" placeholder="" disabled :value="inquiry_info.inquiry_number" <input type="text" placeholder="" disabled :value="inquiry_info.inquiry_number"
style="width: 100px ;margin-right: 30px;" /> style="width: 100px ;margin-right: 30px;" />
</div> </div>
<div class="fl"> <div class="fl">
<span class="p-text">批次</span> <span class="p-text">批次</span>
<input type="text" placeholder="" disabled :value="inquiry_info.batch" <input type="text" placeholder="" disabled :value="inquiry_info.batch"
style="width: 100px;margin-right: 30px; " /> style="width: 100px;margin-right: 30px; " />
</div> </div>
<div class="fl"> <div class="fl">
<span class="p-text">交货日期</span> <span class="p-text">交货日期</span>
<input type="text" placeholder="" disabled :value="inquiry_info.delivery_time" <input type="text" placeholder="" disabled :value="inquiry_info.delivery_time"
style="width: 100px;margin-right: 30px; " /> style="width: 100px;margin-right: 30px; " />
</div> </div>
<div class="fl"> <div class="fl">
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<em v-if="inquiry_info.i_status == 2">已报价</em> <em v-if="inquiry_info.i_status == 2">已报价</em>
<em v-else-if="inquiry_info.i_status == 1">待报价</em> <em v-else-if="inquiry_info.i_status == 1">待报价</em>
<em v-else-if="inquiry_info.i_status == 9">已删除</em> <em v-else-if="inquiry_info.i_status == 9">已删除</em>
<em v-else-if="inquiry_info.i_status == -1">已关闭</em> <em v-else-if="inquiry_info.i_status == -1">已关闭</em>
</p> </p>
</div> </div>
<div class="quote boxsiz"> <div class="quote boxsiz">
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<i class="ic"></i> <i class="ic"></i>
<ul class="tab row verCenter"> <ul class="tab row verCenter">
<li @click="tab(index)" class="boxsiz row rowCenter verCenter" :class="{'curr':active==index}" <li @click="tab(index)" class="boxsiz row rowCenter verCenter" :class="{'curr':active==index}"
v-for="(item,index) in textArr" :key="index">{{item}}</li> v-for="(item,index) in textArr" :key="index">{{item}}</li>
</ul> </ul>
<div class="data-box th-all"> <div class="data-box th-all">
<!--匹配库存--> <!--匹配库存-->
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<el-table-column fixed label="操作" width="108" align="center"> <el-table-column fixed label="操作" width="108" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="dcg" :class="{'disabled':scope.row.disabled}" <span class="dcg" :class="{'disabled':scope.row.disabled}"
@click="handle(scope.$index, scope.row)">确认</span> @click="handle(scope.$index, scope.row)">确认</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed prop="goods_name" label="型号" width="180"></el-table-column> <el-table-column fixed prop="goods_name" label="型号" width="180"></el-table-column>
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total" <el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total"
@current-change="handleCurrentChange" :current-page="page"></el-pagination> @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</template> </template>
<!--历史报价--> <!--历史报价-->
<template v-else> <template v-else>
...@@ -167,27 +167,21 @@ ...@@ -167,27 +167,21 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span class="dcg disabled" @click="handle(scope.$index, scope.row)">确认</span> --> <!-- <span class="dcg disabled" @click="handle(scope.$index, scope.row)">确认</span> -->
<span class="dcg " :class="{'disabled':scope.row.disabled}" <span class="dcg " :class="{'disabled':scope.row.disabled}"
@click="handle(scope.$index, scope.row)">确认</span> @click="handle(scope.$index, scope.row)">确认</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed prop="goods_name" label="报价型号" width="200"></el-table-column> <el-table-column fixed prop="goods_name" label="报价型号" width="200"></el-table-column>
<el-table-column fixed prop="brand_name" label="报价品牌" width="200"></el-table-column> <el-table-column fixed prop="brand_name" label="报价品牌" width="200"></el-table-column>
<<<<<<< HEAD
<el-table-column fixed prop="status" label="状态" width="100"> <el-table-column fixed 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>
=======
<el-table-column label="状态" width="100">
<template slot-scope="scope" >
<span v-if="scope.row.status==1" class="f-green">比价中</span>
>>>>>>> 1555165385e9ecdf25cc0c7a89d09c34be75a679
<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-green" >已成单</span> <span v-else-if="scope.row.status==4" class="f-green" >已成单</span>
<span v-else-if="scope.row.status==5" 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==9" class="f-red1">已删除</span>
<span v-else-if="scope.row.status==-1" 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="expire_status_val" label="是否有效" width="100"></el-table-column> <el-table-column prop="expire_status_val" label="是否有效" width="100"></el-table-column>
<el-table-column prop="price_origin" label="价格" width="100"></el-table-column> <el-table-column prop="price_origin" label="价格" width="100"></el-table-column>
...@@ -204,12 +198,12 @@ ...@@ -204,12 +198,12 @@
<el-table-column prop="inquiry_goods_name" label="型号" width="200"></el-table-column> <el-table-column prop="inquiry_goods_name" label="型号" width="200"></el-table-column>
<el-table-column prop="inquiry_brand_name" label="品牌" width="200"></el-table-column> <el-table-column prop="inquiry_brand_name" label="品牌" width="200"></el-table-column>
<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> </el-table>
<el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total" <el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total"
@current-change="handleCurrentChange" :current-page="page"></el-pagination> @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</template> </template>
</div> </div>
</div> </div>
...@@ -221,7 +215,7 @@ ...@@ -221,7 +215,7 @@
<div class="box"> <div class="box">
<el-form-item label="报价型号" prop="goods_name"> <el-form-item label="报价型号" prop="goods_name">
<el-input v-model="ruleForm.goods_name" :disabled="isModify" placeholder="请输入型号" <el-input v-model="ruleForm.goods_name" :disabled="isModify" placeholder="请输入型号"
:value="ruleForm.goods_name"></el-input> :value="ruleForm.goods_name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="报价数量" prop="quote_number"> <el-form-item label="报价数量" prop="quote_number">
<el-input v-model="ruleForm.quote_number" placeholder="请输入数量" :value="ruleForm.quote_number"></el-input> <el-input v-model="ruleForm.quote_number" placeholder="请输入数量" :value="ruleForm.quote_number"></el-input>
...@@ -240,7 +234,7 @@ ...@@ -240,7 +234,7 @@
</el-form-item> </el-form-item>
<el-form-item label="其他费用" class="updatebox"> <el-form-item label="其他费用" class="updatebox">
<el-input placeholder="" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" v-model="ruleForm.price_other" placeholder="请输入其他费用" <el-input placeholder="" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" v-model="ruleForm.price_other" placeholder="请输入其他费用"
:value="ruleForm.price_other"></el-input> :value="ruleForm.price_other"></el-input>
<!-- <div class="selectdw"> <!-- <div class="selectdw">
<el-select v-model="ruleForm.unit" placeholder="RMB" class="placehoload"> <el-select v-model="ruleForm.unit" placeholder="RMB" class="placehoload">
<el-option label="RMB" value="RMB"></el-option> <el-option label="RMB" value="RMB"></el-option>
...@@ -252,8 +246,8 @@ ...@@ -252,8 +246,8 @@
<div class="box"> <div class="box">
<el-form-item label="报价品牌" prop="brand_s"> <el-form-item label="报价品牌" prop="brand_s">
<el-autocomplete :disabled="isModify" :value="ruleForm.brand" v-model="ruleForm.brand" <el-autocomplete :disabled="isModify" :value="ruleForm.brand" v-model="ruleForm.brand"
:trigger-on-focus="true" :fetch-suggestions="querySearchAsync" placeholder="请输入品牌" :trigger-on-focus="true" :fetch-suggestions="querySearchAsync" placeholder="请输入品牌"
@select="handleSelectBrandName"></el-autocomplete> @select="handleSelectBrandName"></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="价格" prop="price_origin"> <el-form-item label="价格" prop="price_origin">
<el-input v-model="ruleForm.price_origin" placeholder="请输入价格" :value="ruleForm.price_origin"></el-input> <el-input v-model="ruleForm.price_origin" placeholder="请输入价格" :value="ruleForm.price_origin"></el-input>
...@@ -264,11 +258,11 @@ ...@@ -264,11 +258,11 @@
</el-form-item> </el-form-item>
<el-form-item label="货期" prop="delivery_time_val" class="updatebox"> <el-form-item label="货期" prop="delivery_time_val" class="updatebox">
<el-input placeholder="" v-model="ruleForm.delivery_time_val" :value="ruleForm.delivery_time" <el-input placeholder="" v-model="ruleForm.delivery_time_val" :value="ruleForm.delivery_time"
onkeyup="this.value = this.value.replace(/[^\d]/g,'');" onkeyup="this.value = this.value.replace(/[^\d]/g,'');"
@keyup.native="keyup(ruleForm.delivery_time_val)"></el-input> @keyup.native="keyup(ruleForm.delivery_time_val)"></el-input>
<div class="selectdw"> <div class="selectdw">
<el-select v-model="ruleForm.delivery_time_unit" placeholder="天" class="placehoload" <el-select v-model="ruleForm.delivery_time_unit" placeholder="天" class="placehoload"
@change="unitChange"> @change="unitChange">
<el-option label="天" value="天"></el-option> <el-option label="天" value="天"></el-option>
<el-option label="周" value="周"></el-option> <el-option label="周" value="周"></el-option>
</el-select> </el-select>
...@@ -279,7 +273,7 @@ ...@@ -279,7 +273,7 @@
</el-form-item> </el-form-item>
<el-form-item label="报价有效期" prop="expire_time"> <el-form-item label="报价有效期" prop="expire_time">
<el-date-picker type="date" placeholder="选择报价有效期" value-format="yyyy-MM-dd" <el-date-picker type="date" placeholder="选择报价有效期" value-format="yyyy-MM-dd"
v-model="ruleForm.expire_time"></el-date-picker> v-model="ruleForm.expire_time"></el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
...@@ -425,12 +419,12 @@ ...@@ -425,12 +419,12 @@
created() { created() {
this.getData(); this.getData();
}, },
watch: { watch: {
$route(to, from) { $route(to, from) {
if(to.path==from.path){ if(to.path==from.path){
this.getData() this.getData()
} }
} }
}, },
methods: { methods: {
getData() { getData() {
...@@ -462,7 +456,7 @@ ...@@ -462,7 +456,7 @@
this.total = Number(res.data.count) || 0; this.total = Number(res.data.count) || 0;
var arr_ = this.tableData, var arr_ = this.tableData,
id_arr = [] id_arr = []
for (var i = 0; i < arr_.length; i++) { for (var i = 0; i < arr_.length; i++) {
id_arr.push(arr_[i].goods_id) id_arr.push(arr_[i].goods_id)
} }
...@@ -482,7 +476,7 @@ ...@@ -482,7 +476,7 @@
if (res.err_code === 0) { if (res.err_code === 0) {
if (res.data && res.data.bind_ids && res.data.bind_ids.length > 0) { if (res.data && res.data.bind_ids && res.data.bind_ids.length > 0) {
var arr_ = this.active == 1 ? JSON.parse(JSON.stringify(this.historyList)) : JSON.parse(JSON var arr_ = this.active == 1 ? JSON.parse(JSON.stringify(this.historyList)) : JSON.parse(JSON
.stringify(this.tableData)) .stringify(this.tableData))
for (var i = 0; i < arr_.length; i++) { for (var i = 0; i < arr_.length; i++) {
var str_ = this.active == 1 ? String(arr_[i].id) : String(arr_[i].goods_id); var str_ = this.active == 1 ? String(arr_[i].id) : String(arr_[i].goods_id);
if (res.data.bind_ids.indexOf(str_) != -1) { if (res.data.bind_ids.indexOf(str_) != -1) {
...@@ -522,7 +516,7 @@ ...@@ -522,7 +516,7 @@
this.total = res.data.total; this.total = res.data.total;
this.historyList = res.data.list || []; this.historyList = res.data.list || [];
var arr_ = this.historyList, var arr_ = this.historyList,
id_arr = [] id_arr = []
for (var i = 0; i < arr_.length; i++) { for (var i = 0; i < arr_.length; i++) {
id_arr.push(arr_[i].id) id_arr.push(arr_[i].id)
} }
...@@ -702,7 +696,7 @@ ...@@ -702,7 +696,7 @@
} }
if (this.multipleSelection[0].status == 1 || this.multipleSelection[0].status == 3 || this.multipleSelection[0] if (this.multipleSelection[0].status == 1 || this.multipleSelection[0].status == 3 || this.multipleSelection[0]
.status == 5) { .status == 5) {
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]['id'])
...@@ -809,32 +803,32 @@ ...@@ -809,32 +803,32 @@
this.isModify = true; this.isModify = true;
if (this.active != 1) { if (this.active != 1) {
//匹配库存 不请求接口 //匹配库存 不请求接口
this.$http('get', "/api/quote/gettransinfoforsku", { this.$http('get', "/api/quote/gettransinfoforsku", {
goods_id:row.goods_id, goods_id:row.goods_id,
inquiry_items_id:this.$route.query.id inquiry_items_id:this.$route.query.id
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
var datap_=res.data.trans_to_quote_info; var datap_=res.data.trans_to_quote_info;
this.ruleForm.goods_name =datap_.goods_name; this.ruleForm.goods_name =datap_.goods_name;
this.ruleForm.batch = datap_.batch; this.ruleForm.batch = datap_.batch;
this.ruleForm.price_origin = datap_.price_origin; this.ruleForm.price_origin = datap_.price_origin;
this.ruleForm.brand = datap_.brand_name; this.ruleForm.brand = datap_.brand_name;
let brand_ssaa = [{ let brand_ssaa = [{
brand_id: datap_.brand_id, brand_id: datap_.brand_id,
brand_name: datap_.brand_name brand_name: datap_.brand_name
}] }]
this.ruleForm.brand_s = JSON.stringify(brand_ssaa); this.ruleForm.brand_s = JSON.stringify(brand_ssaa);
this.ruleForm.moq = datap_.moq; this.ruleForm.moq = datap_.moq;
this.ruleForm.mpq = datap_.mpq; this.ruleForm.mpq = datap_.mpq;
this.ruleForm.quote_number = datap_.quote_number; this.ruleForm.quote_number = datap_.quote_number;
} else { } else {
this.$message(res.err_msg); this.$message(res.err_msg);
} }
}) })
} else { } else {
this.$http('get', "/api/quote/getinfo", { this.$http('get', "/api/quote/getinfo", {
id: row.id id: row.id
......
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