Commit 3c135a39 by 肖康

x

parent 052fc017
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<i class="iconfont iconjinzhi1"></i> <i class="iconfont iconjinzhi1"></i>
<p class="t1">待报价</p> <p class="t1">待报价</p>
</div> </div>
<span class="color3">{{data.wait_quote_count}}</span> <span class="color3">{{data.weekly_inquiry_ready_count}}</span>
</li> </li>
<li class="column boxsiz"> <li class="column boxsiz">
<div class="wrap"> <div class="wrap">
......
<template> <template>
<section class="inquireDetail pagex"> <section class="inquireDetail pagex">
<div class="inquiry-information boxsiz"> <div class="inquiry-information boxsiz">
<p class="tit">询价信息</p> <p class="tit">询价信息</p>
<div class="input-box"> <div class="input-box">
<span class="p-text">型号</span> <span class="p-text">型号</span>
<input type="text" placeholder="" disabled :value="inquiry_info.goods_name" style="width: 176px;margin-right: 30px; "/> <input type="text" placeholder="" disabled :value="inquiry_info.goods_name"
<span class="p-text">品牌</span> style="width: 176px;margin-right: 30px; " />
<input type="text" placeholder="" disabled :value="inquiry_info.brand_name" style="width: 100px;margin-right: 30px; "/> <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.inquiry_number" style="width: 100px ;margin-right: 30px;"/> style="width: 100px;margin-right: 30px; " />
<span class="p-text">批次</span> <span class="p-text">数量</span>
<input type="text" placeholder="" disabled :value="inquiry_info.batch" style="width: 100px;margin-right: 30px; "/> <input type="text" placeholder="" disabled :value="inquiry_info.inquiry_number"
<span class="p-text">交货日期</span> style="width: 100px ;margin-right: 30px;" />
<input type="text" placeholder="" disabled :value="inquiry_info.delivery_time" style="width: 100px;margin-right: 30px; "/> <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.inquiry_sn" style="width: 138px "/> style="width: 100px;margin-right: 30px; " />
</div> <span class="p-text">交货日期</span>
<p class="text"> <input type="text" placeholder="" disabled :value="inquiry_info.delivery_time"
<span>状态:</span> style="width: 100px;margin-right: 30px; " />
<em v-if="inquiry_info.status == 1">待报价</em> <span class="p-text">询价单号</span>
<em v-else-if="inquiry_info.status == 9">待报价</em> <input type="text" placeholder="" disabled :value="inquiry_info.inquiry_sn" style="width: 138px " />
<em v-else-if="inquiry_info.status == -1">已关闭</em> </div>
<em v-else-if="inquiry_info.status == 2">已报价</em> <p class="text">
</p> <span>状态:</span>
</div> <em v-if="inquiry_info.status == 1">待报价</em>
<div class="quote boxsiz"> <em v-else-if="inquiry_info.status == 9">待报价</em>
<p class="tit">报价信息</p> <em v-else-if="inquiry_info.status == -1">已关闭</em>
<div class="btn-nav clr"> <em v-else-if="inquiry_info.status == 2">已报价</em>
<div class="fl dcg" @click="added" style="margin-left: 0px;">新增</div> </p>
<div class="fl dcg updatex" @click="modify">修改</div> </div>
<div class="fl dcg delbtn" @click="del">删除</div> <div class="quote boxsiz">
</div> <p class="tit">报价信息</p>
<div class="btn-nav clr">
<div class="fl dcg" @click="added" style="margin-left: 0px;">新增</div>
<div class="fl dcg updatex" @click="modify">修改</div>
<div class="fl dcg delbtn" @click="del">删除</div>
</div>
<div class="data-box th-all"> <div class="data-box th-all">
<el-table :data="quote_list" border style="width: 100%" @selection-change="handleSelectionChange"> <el-table :data="quote_list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="40" align="center"></el-table-column> <el-table-column type="selection" width="40" align="center"></el-table-column>
<el-table-column prop="goods_name" label="报价型号" width="200"></el-table-column> <el-table-column prop="goods_name" label="报价型号" width="200"></el-table-column>
<el-table-column prop="brand_name" label="报价品牌" width="200"></el-table-column> <el-table-column prop="brand_name" label="报价品牌" width="200"></el-table-column>
<el-table-column prop="status" 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==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="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="100"></el-table-column> <el-table-column prop="price_origin" label="价格" width="100"></el-table-column>
<el-table-column prop="currency" label="币种" width="100"> <el-table-column prop="currency" label="币种" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.currency==1">人民币</span> <span v-if="scope.row.currency==1">人民币</span>
<span v-else-if="scope.row.currency==2">美元</span> <span v-else-if="scope.row.currency==2">美元</span>
<span v-else-if="scope.row.currency==3">港币</span> <span v-else-if="scope.row.currency==3">港币</span>
<span v-else-if="scope.row.currency==4">欧元</span> <span v-else-if="scope.row.currency==4">欧元</span>
<span v-else-if="scope.row.currency==5">英磅</span> <span v-else-if="scope.row.currency==5">英磅</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="tax_rate" 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="mpq" label="最小包装数量" width="200"></el-table-column> <el-table-column prop="mpq" label="最小包装数量" width="200"></el-table-column>
<el-table-column prop="moq" 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="expire_time" 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" :formatter='dateFormat'></el-table-column> <el-table-column prop="create_time" label="最近报价时间" width="200" :formatter='dateFormat'></el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<div class="assistant"> <div class="assistant">
<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}" v-for="(item,index) in textArr" :key="index">{{item}}</li> <li @click="tab(index)" class="boxsiz row rowCenter verCenter" :class="{'curr':active==index}"
</ul> v-for="(item,index) in textArr" :key="index">{{item}}</li>
<div class="data-box th-all"> </ul>
<!--匹配库存--> <div class="data-box th-all">
<template v-if="active==0"> <!--匹配库存-->
<el-table :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange"> <template v-if="active==0">
<el-table-column fixed label="操作" width="108" align="center" v-if="'show'"> <el-table :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange">
<template slot-scope="scope"> <el-table-column fixed label="操作" width="108" align="center" v-if="'show'">
<span class="dcg" @click="handle(scope.$index, scope.row)">确认</span> <template slot-scope="scope">
</template> <span class="dcg" @click="handle(scope.$index, scope.row)">确认</span>
</el-table-column> </template>
<el-table-column fixed prop="goods_name" label="型号" width="180"></el-table-column> </el-table-column>
<el-table-column fixed prop="goods_sn" label="供应商内部型号编码" width="180"></el-table-column> <el-table-column fixed prop="goods_name" label="型号" width="180"></el-table-column>
<el-table-column fixed prop="brand_name" label="品牌" width="180"></el-table-column> <el-table-column fixed prop="goods_sn" label="供应商内部型号编码" width="180"></el-table-column>
<el-table-column prop="batch_sn" label="封装" width="180"></el-table-column> <el-table-column fixed prop="brand_name" label="品牌" width="180"></el-table-column>
<el-table-column prop="moq" label="起订量" width="150"></el-table-column> <el-table-column prop="batch_sn" label="封装" width="180"></el-table-column>
<el-table-column prop="mpq" label="标准包装量" width="150"></el-table-column> <el-table-column prop="moq" label="起订量" width="150"></el-table-column>
<el-table-column prop="stock" label="库存数量" width="150"> <el-table-column prop="mpq" label="标准包装量" width="150"></el-table-column>
</el-table-column> <el-table-column prop="stock" label="库存数量" width="150">
<el-table-column prop="cn_ladder_price" label="国内含税价(¥)" width="140"> </el-table-column>
<template slot-scope="scope" v-if="scope.row.cn_ladder_price&&scope.row.cn_ladder_price.length>0"> <el-table-column prop="cn_ladder_price" label="国内含税价(¥)" width="140">
<div class="price-more"> <template slot-scope="scope" v-if="scope.row.cn_ladder_price&&scope.row.cn_ladder_price.length>0">
<el-tooltip placement="bottom" effect="light"> <div class="price-more">
<div slot="content"> <el-tooltip placement="bottom" effect="light">
<div class="boxxrth2021"> <div slot="content">
<p class="clr" v-for="item in scope.row.cn_ladder_price"> <div class="boxxrth2021">
<span class="fl">{{item.purchases}}+</span> <p class="clr" v-for="item in scope.row.cn_ladder_price">
<span class="fl">&yen;{{item.price}}</span> <span class="fl">{{item.purchases}}+</span>
</p> <span class="fl">&yen;{{item.price}}</span>
</div> </p>
</div> </div>
<div class="more-search-btn">查看更多</div>
</el-tooltip>
</div>
</template>
</el-table-column>
<el-table-column prop="hk_ladder_price" label="香港交货价($)" width="150">
<template slot-scope="scope" v-if="scope.row.hk_ladder_price&&scope.row.hk_ladder_price.length>0">
<div class="price-more">
<el-tooltip placement="bottom" effect="light">
<div slot="content">
<div class="boxxrth2021">
<p class="clr" v-for="item in scope.row.hk_ladder_price">
<span class="fl">{{item.purchases}}+</span>
<span class="fl">&yen;{{item.price}}</span>
</p>
</div>
</div>
<div class="more-search-btn">查看更多</div>
</el-tooltip>
</div>
</template>
</el-table-column>
<el-table-column prop="cn_delivery_time" label="大陆交期" width="150"></el-table-column>
<el-table-column prop="hk_delivery_time" label="香港交期" width="150">
</el-table-column>
<el-table-column prop="goods_status" label="状态" width="150" v-if="'show'">
<template slot-scope="scope">
<span v-if="scope.row.goods_status==1" class="f-green">上架</span>
<span v-else-if="scope.row.goods_status==3">下架</span>
</template>
</el-table-column>
</el-table>
<el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total" @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</template>
<!--历史报价-->
<template v-else-if="active==1">
<el-table :data="historyList" border style="width: 100%">
<el-table-column fixed label="操作" width="108" align="center" v-if="'show'">
<template slot-scope="scope">
<!-- <span class="dcg disabled" @click="handle(scope.$index, scope.row)">确认</span> -->
<span class="dcg " @click="handle(scope.$index, scope.row)">确认</span>
</template>
</el-table-column>
<el-table-column prop="goods_name" label="报价型号" width="200"></el-table-column>
<el-table-column prop="brand_name" label="报价品牌" width="200"></el-table-column>
<el-table-column prop="status" label="状态" width="100" v-if="'show'">
<template slot-scope="scope">
<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==3">已确认</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>
</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="currency" 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="delivery_time" label="货期" width="100"></el-table-column>
<el-table-column prop="mpq" label="最小包装数量" width="150"></el-table-column>
<el-table-column prop="moq" label="起订量" width="100"></el-table-column>
<el-table-column prop="price_other" 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="create_time" label="最近报价时间" width="200"></el-table-column>
<el-table-column prop="expire_time" label="型号" width="200"></el-table-column>
<el-table-column prop="expire_time" label="品牌" width="200"></el-table-column>
<el-table-column prop="inquiry_sn" label="询价单号" width="200"></el-table-column>
</el-table>
<el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total" @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</template>
</div>
</div>
<!--弹窗-->
<el-dialog :title="title" :visible.sync="dialogVisible" width="656px" class="xx">
<div class="dialog-form">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<div class="row bothSide">
<div class="box">
<el-form-item label="报价型号" prop="goods_name">
<el-input v-model="ruleForm.goods_name" :disabled="isModify" placeholder="请输入型号" :value="ruleForm.goods_name"></el-input>
</el-form-item>
<el-form-item label="报价数量" prop="quote_number">
<el-input v-model="ruleForm.quote_number" placeholder="请输入数量" :value="ruleForm.quote_number"></el-input>
</el-form-item>
<el-form-item label="币种">
<el-select v-model="ruleForm.currency" @change="currentChange">
<el-option label="RMB" value="1"></el-option>
<el-option label="USD" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="批次" prop="batch">
<el-input v-model="ruleForm.batch" placeholder="请输入D/C" :value="ruleForm.batch"></el-input>
</el-form-item>
<el-form-item label="最小包装数量">
<el-input v-model="ruleForm.mpq" placeholder="请输入MPQ" :value="ruleForm.mpq"></el-input>
</el-form-item>
<el-form-item label="其他费用" class="updatebox">
<el-input placeholder="" v-model="ruleForm.price_other" placeholder="请输入其他费用" :value="ruleForm.price_other"></el-input>
<div class="selectdw">
<el-select v-model="ruleForm.unit" placeholder="RGB" class="placehoload">
<el-option label="RGB" value="RGB"></el-option>
<el-option label="USD" value="USD"></el-option>
</el-select>
</div>
</el-form-item>
</div>
<div class="box">
<el-form-item label="报价品牌" prop="brand_s">
<el-autocomplete :disabled="isModify" :value="ruleForm.brand" v-model="ruleForm.brand" :trigger-on-focus="true" :fetch-suggestions="querySearchAsync" placeholder="请输入品牌" @select="handleSelectBrandName"></el-autocomplete>
</el-form-item>
<el-form-item label="价格" prop="price_origin">
<el-input v-model="ruleForm.price_origin" placeholder="请输入价格" :value="ruleForm.price_origin"></el-input>
</el-form-item>
<el-form-item label="税率">
<el-input disabled v-model="ruleForm.tax_rate" style="width: 100px" :value="ruleForm.tax_rate"></el-input>
</el-form-item>
<el-form-item label="货期" prop="delivery_time_val" class="updatebox">
<el-input placeholder="" v-model="ruleForm.delivery_time_val" :value="ruleForm.delivery_time" onkeyup="this.value = this.value.replace(/[^\d]/g,'');" @keyup.native="keyup(ruleForm.delivery_time_val)"></el-input>
<div class="selectdw">
<el-select v-model="ruleForm.delivery_time_unit" placeholder="天" class="placehoload" @change="unitChange">
<el-option label="天" value="天"></el-option>
<el-option label="周" value="周"></el-option>
</el-select>
</div>
</el-form-item>
<el-form-item label="起订量">
<el-input v-model="ruleForm.moq" placeholder="请输入起订量" :value="ruleForm.moq"></el-input>
</el-form-item>
<el-form-item label="报价有效期" prop="expire_time">
<el-date-picker type="date" placeholder="选择报价有效期" v-model="ruleForm.expire_time"></el-date-picker>
</el-form-item>
</div>
</div> </div>
<el-form-item label="备注"> <div class="more-search-btn">查看更多</div>
<el-input type="textarea" v-model="ruleForm.remark" placeholder="请输入备注"></el-input> </el-tooltip>
</el-form-item> </div>
</el-form> </template>
</el-table-column>
<el-table-column prop="hk_ladder_price" label="香港交货价($)" width="150">
<template slot-scope="scope" v-if="scope.row.hk_ladder_price&&scope.row.hk_ladder_price.length>0">
<div class="price-more">
<el-tooltip placement="bottom" effect="light">
<div slot="content">
<div class="boxxrth2021">
<p class="clr" v-for="item in scope.row.hk_ladder_price">
<span class="fl">{{item.purchases}}+</span>
<span class="fl">&yen;{{item.price}}</span>
</p>
</div>
</div>
<div class="more-search-btn">查看更多</div>
</el-tooltip>
</div>
</template>
</el-table-column>
<el-table-column prop="cn_delivery_time" label="大陆交期" width="150"></el-table-column>
<el-table-column prop="hk_delivery_time" label="香港交期" width="150">
</el-table-column>
<el-table-column prop="goods_status" label="状态" width="150" v-if="'show'">
<template slot-scope="scope">
<span v-if="scope.row.goods_status==1" class="f-green">上架</span>
<span v-else-if="scope.row.goods_status==3">下架</span>
</template>
</el-table-column>
</el-table>
<el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total"
@current-change="handleCurrentChange" :current-page="page"></el-pagination>
</template>
<!--历史报价-->
<template v-else-if="active==1">
<el-table :data="historyList" border style="width: 100%">
<el-table-column fixed label="操作" width="108" align="center" v-if="'show'">
<template slot-scope="scope">
<!-- <span class="dcg disabled" @click="handle(scope.$index, scope.row)">确认</span> -->
<span class="dcg " @click="handle(scope.$index, scope.row)">确认</span>
</template>
</el-table-column>
<el-table-column prop="goods_name" label="报价型号" width="200"></el-table-column>
<el-table-column prop="brand_name" label="报价品牌" width="200"></el-table-column>
<el-table-column prop="status" label="状态" width="100" v-if="'show'">
<template slot-scope="scope">
<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==3">已确认</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>
</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="currency" 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="delivery_time" label="货期" width="100"></el-table-column>
<el-table-column prop="mpq" label="最小包装数量" width="150"></el-table-column>
<el-table-column prop="moq" label="起订量" width="100"></el-table-column>
<el-table-column prop="price_other" 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="create_time" label="最近报价时间" width="200"></el-table-column>
<el-table-column prop="expire_time" label="型号" width="200"></el-table-column>
<el-table-column prop="expire_time" label="品牌" width="200"></el-table-column>
<el-table-column prop="inquiry_sn" label="询价单号" width="200"></el-table-column>
</el-table>
<el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total"
@current-change="handleCurrentChange" :current-page="page"></el-pagination>
</template>
</div>
</div>
<!--弹窗-->
<el-dialog :title="title" :visible.sync="dialogVisible" width="656px" class="xx">
<div class="dialog-form">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<div class="row bothSide">
<div class="box">
<el-form-item label="报价型号" prop="goods_name">
<el-input v-model="ruleForm.goods_name" :disabled="isModify" placeholder="请输入型号"
:value="ruleForm.goods_name"></el-input>
</el-form-item>
<el-form-item label="报价数量" prop="quote_number">
<el-input v-model="ruleForm.quote_number" placeholder="请输入数量" :value="ruleForm.quote_number"></el-input>
</el-form-item>
<el-form-item label="币种">
<el-select v-model="ruleForm.currency" @change="currentChange">
<el-option label="RMB" value="1"></el-option>
<el-option label="USD" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="批次" prop="batch">
<el-input v-model="ruleForm.batch" placeholder="请输入D/C" :value="ruleForm.batch"></el-input>
</el-form-item>
<el-form-item label="最小包装数量">
<el-input v-model="ruleForm.mpq" placeholder="请输入MPQ" :value="ruleForm.mpq"></el-input>
</el-form-item>
<el-form-item label="其他费用" class="updatebox">
<el-input placeholder="" v-model="ruleForm.price_other" placeholder="请输入其他费用"
:value="ruleForm.price_other"></el-input>
<div class="selectdw">
<el-select v-model="ruleForm.unit" placeholder="RGB" class="placehoload">
<el-option label="RGB" value="RGB"></el-option>
<el-option label="USD" value="USD"></el-option>
</el-select>
</div>
</el-form-item>
</div> </div>
<div slot="footer" class="dialog-footer"> <div class="box">
<el-button @click="dialogVisible = false">取 消</el-button> <el-form-item label="报价品牌" prop="brand_s">
<el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button> <el-autocomplete :disabled="isModify" :value="ruleForm.brand" v-model="ruleForm.brand"
:trigger-on-focus="true" :fetch-suggestions="querySearchAsync" placeholder="请输入品牌"
@select="handleSelectBrandName"></el-autocomplete>
</el-form-item>
<el-form-item label="价格" prop="price_origin">
<el-input v-model="ruleForm.price_origin" placeholder="请输入价格" :value="ruleForm.price_origin"></el-input>
</el-form-item>
<el-form-item label="税率">
<el-input disabled v-model="ruleForm.tax_rate" style="width: 100px" :value="ruleForm.tax_rate">
</el-input>
</el-form-item>
<el-form-item label="货期" prop="delivery_time_val" class="updatebox">
<el-input placeholder="" v-model="ruleForm.delivery_time_val" :value="ruleForm.delivery_time"
onkeyup="this.value = this.value.replace(/[^\d]/g,'');"
@keyup.native="keyup(ruleForm.delivery_time_val)"></el-input>
<div class="selectdw">
<el-select v-model="ruleForm.delivery_time_unit" placeholder="天" class="placehoload"
@change="unitChange">
<el-option label="天" value="天"></el-option>
<el-option label="周" value="周"></el-option>
</el-select>
</div>
</el-form-item>
<el-form-item label="起订量">
<el-input v-model="ruleForm.moq" placeholder="请输入起订量" :value="ruleForm.moq"></el-input>
</el-form-item>
<el-form-item label="报价有效期" prop="expire_time">
<el-date-picker type="date" placeholder="选择报价有效期" v-model="ruleForm.expire_time"></el-date-picker>
</el-form-item>
</div> </div>
</el-dialog> </div>
<Menu/> <el-form-item label="备注">
</section> <el-input type="textarea" v-model="ruleForm.remark" placeholder="请输入备注"></el-input>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
</div>
</el-dialog>
<Menu />
</section>
</template> </template>
<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 {
dateTimeFormate
} from "../../filters/formate.js";
import { import {
Form, Form,
...@@ -281,13 +299,15 @@ ...@@ -281,13 +299,15 @@
Tooltip Tooltip
} from 'element-ui' } from 'element-ui'
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Autocomplete).use(Loading).use(Tooltip); Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Autocomplete).use(Loading)
.use(Tooltip);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination);
export default { export default {
name: "InquireDetail", name: "InquireDetail",
data() { data() {
return { return {
currentDataId:0,
active: 0, active: 0,
total: 0, total: 0,
limit: 10, limit: 10,
...@@ -324,30 +344,45 @@ ...@@ -324,30 +344,45 @@
remark: '' remark: ''
}, },
rules: { rules: {
goods_name: [ goods_name: [{
{required: true, message: '请输入报价型号', trigger: 'blur'} required: true,
], message: '请输入报价型号',
quote_number: [ trigger: 'blur'
{required: true, message: '请输入报价数量', trigger: 'blur'} }],
], quote_number: [{
currency: [ required: true,
{required: true, message: '请选择币种', trigger: 'blur'} message: '请输入报价数量',
], trigger: 'blur'
batch: [ }],
{required: true, message: '请输入批次', trigger: 'blur'} currency: [{
], required: true,
brand: [ message: '请选择币种',
{required: true, message: '请选择报价品牌'} trigger: 'blur'
], }],
price_origin: [ batch: [{
{required: true, message: '请输入价格', trigger: 'blur'}, required: true,
], message: '请输入批次',
delivery_time_val: [ trigger: 'blur'
{required: true, message: '请输入货期', trigger: 'blur'} }],
], brand: [{
expire_time: [ required: true,
{required: true, message: '请输入报价有效期', trigger: 'blur'} message: '请选择报价品牌'
] }],
price_origin: [{
required: true,
message: '请输入价格',
trigger: 'blur'
}, ],
delivery_time_val: [{
required: true,
message: '请输入货期',
trigger: 'blur'
}],
expire_time: [{
required: true,
message: '请输入报价有效期',
trigger: 'blur'
}]
}, },
dialogVisible: false, dialogVisible: false,
brandList: [], brandList: [],
...@@ -375,6 +410,7 @@ ...@@ -375,6 +410,7 @@
}); });
}, },
getSkulist() { getSkulist() {
console.log('库存匹配')
this.$http('get', "/api/sku/list", { this.$http('get', "/api/sku/list", {
brand_id: this.inquiry_info.brand_id, brand_id: this.inquiry_info.brand_id,
goods_name: 'this.inquiry_info.goods_name', goods_name: 'this.inquiry_info.goods_name',
...@@ -388,7 +424,19 @@ ...@@ -388,7 +424,19 @@
} }
}) })
}, },
checkBind(ids){
this.$http('get', "/api/quote/checkpinlist", {
inquiry_items_id:this.$route.query.id,
pin_type:(this.active == 1 ? 1 : 2),
pin_obj_ids:ids
}).then(res => {
if (res.err_code === 0) {
console.log(res.data.bind_ids)
}
})
},
getHistory() { getHistory() {
console.log('历史报价')
this.$http('get', "/api/quote/history", { this.$http('get', "/api/quote/history", {
page: this.page, page: this.page,
limit: this.limit, limit: this.limit,
...@@ -399,6 +447,11 @@ ...@@ -399,6 +447,11 @@
if (res.err_code === 0) { if (res.err_code === 0) {
this.total = res.data.total; this.total = res.data.total;
this.historyList = res.data.list || []; this.historyList = res.data.list || [];
var arr_=this.historyList,id_arr=[]
for(var i=0;i<arr_.length;i++){
id_arr.push(arr_[i].id)
}
this.checkBind(id_arr.join(","))
} else { } else {
Message(res.err_msg); Message(res.err_msg);
} }
...@@ -463,13 +516,27 @@ ...@@ -463,13 +516,27 @@
this.$http('post', "/api/quote/save", this.ruleForm).then(res => { this.$http('post', "/api/quote/save", this.ruleForm).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
Message('操作成功'); Message('操作成功');
setTimeout(() => { this.$http('post', "/api/quote/pin", {
window.location.reload(); inquiry_items_id:this.ruleForm.inquiry_items_id,
}, 2000) pin_type:(this.active == 1 ? 1 : 2),
pin_obj_id:this.currentDataId
}).then(res => {
if (res.err_code == 0) {
Message('操作成功');
setTimeout(() => {
window.location.reload();
}, 2000)
} else {
Message(res.err_msg);
}
loadingInstance.close();
})
} else { } else {
Message(res.err_msg); Message(res.err_msg);
loadingInstance.close();
} }
loadingInstance.close();
}).catch(err => { }).catch(err => {
loadingInstance.close(); loadingInstance.close();
}); });
...@@ -488,14 +555,20 @@ ...@@ -488,14 +555,20 @@
this.brandList = []; this.brandList = [];
this.ruleForm.brand = ""; this.ruleForm.brand = "";
for (var i = 0; i < arrlist_.length; i++) { for (var i = 0; i < arrlist_.length; i++) {
this.brandList.push({value: arrlist_[i]['brand_name'], brand_id: arrlist_[i]['brand_id']}) this.brandList.push({
value: arrlist_[i]['brand_name'],
brand_id: arrlist_[i]['brand_id']
})
} }
cb(this.brandList); cb(this.brandList);
} }
}) })
}, },
handleSelectBrandName(item) { handleSelectBrandName(item) {
let brand_ss = [{brand_id: '', brand_name: ''}]; let brand_ss = [{
brand_id: '',
brand_name: ''
}];
brand_ss[0].brand_id = item.brand_id; brand_ss[0].brand_id = item.brand_id;
brand_ss[0].brand_name = item.value; brand_ss[0].brand_name = item.value;
this.ruleForm.brand_s = JSON.stringify(brand_ss); this.ruleForm.brand_s = JSON.stringify(brand_ss);
...@@ -530,7 +603,8 @@ ...@@ -530,7 +603,8 @@
return; return;
} }
if (this.multipleSelection[0].status == 1 || this.multipleSelection[0].status == 3 || this.multipleSelection[0].status == 5) { if (this.multipleSelection[0].status == 1 || this.multipleSelection[0].status == 3 || this.multipleSelection[0]
.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'])
...@@ -568,7 +642,10 @@ ...@@ -568,7 +642,10 @@
this.ruleForm.expire_time = res.data.quote_info.expire_time; this.ruleForm.expire_time = res.data.quote_info.expire_time;
} }
let brand_ss = [{brand_id: '', brand_name: ''}]; let brand_ss = [{
brand_id: '',
brand_name: ''
}];
brand_ss[0].brand_id = res.data.quote_info.brand_id; brand_ss[0].brand_id = res.data.quote_info.brand_id;
brand_ss[0].brand_name = res.data.quote_info.brand_name; brand_ss[0].brand_name = res.data.quote_info.brand_name;
this.ruleForm.brand_s = JSON.stringify(brand_ss); this.ruleForm.brand_s = JSON.stringify(brand_ss);
...@@ -612,8 +689,9 @@ ...@@ -612,8 +689,9 @@
}) })
}, },
handle(index, row) { handle(index, row) {
this.title = '确认-匹配库存'; this.currentDataId=row.id
this.title = this.active == 1 ? '确认-历史报价' : '确认-匹配库存';
this.dialogVisible = true; this.dialogVisible = true;
this.ruleForm.quote_id = ''; this.ruleForm.quote_id = '';
this.isModify = true; this.isModify = true;
...@@ -647,7 +725,10 @@ ...@@ -647,7 +725,10 @@
} }
let brand_ss = [{brand_id: '', brand_name: ''}]; let brand_ss = [{
brand_id: '',
brand_name: ''
}];
brand_ss[0].brand_id = res.data.quote_info.brand_id; brand_ss[0].brand_id = res.data.quote_info.brand_id;
brand_ss[0].brand_name = res.data.quote_info.brand_name; brand_ss[0].brand_name = res.data.quote_info.brand_name;
this.ruleForm.brand_s = JSON.stringify(brand_ss); this.ruleForm.brand_s = JSON.stringify(brand_ss);
...@@ -664,5 +745,5 @@ ...@@ -664,5 +745,5 @@
}; };
</script> </script>
<style scoped> <style scoped>
@import "../../assets/css/list/inquireDetail.min.css"; @import "../../assets/css/list/inquireDetail.min.css";
</style> </style>
\ No newline at end of file
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