Commit e0e645b0 by 肖康

x

parent 47f349da
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<font class="fl">概况</font> <font class="fl">概况</font>
</a> </a>
<a class="item fl" :class="{'act':item.path==$route.path}" @click="tabUrl(item)" v-for="item in tabs"> <a class="item fl" :class="{'act':(JSON.stringify(item)==JSON.stringify({path: $route.path,title: $route.meta.title,query:$route.query}))}" @click="tabUrl(item)" v-for="item in tabs">
<font class="fl">{{item.title}}</font> <font class="fl">{{item.title}}</font>
<span class="icon iconfont fl" @click.stop="closetab(item.path)"></span> <span class="icon iconfont fl" @click.stop="closetab(item.path)"></span>
</a> </a>
...@@ -187,6 +187,7 @@ ...@@ -187,6 +187,7 @@
if (tab_arr) { if (tab_arr) {
this.tabs = JSON.parse(tab_arr); this.tabs = JSON.parse(tab_arr);
} }
let app_ = document.getElementById('app'); let app_ = document.getElementById('app');
this.collapse = false this.collapse = false
if (this.collapse) { if (this.collapse) {
......
...@@ -50,7 +50,8 @@ router.afterEach((to, from, next) => { ...@@ -50,7 +50,8 @@ router.afterEach((to, from, next) => {
tabOldJson = [ tabOldJson = [
{ {
path: to.path, path: to.path,
title: to.meta.title title: to.meta.title,
query:to.query
} }
] ]
......
...@@ -52,7 +52,7 @@ const routes = [ ...@@ -52,7 +52,7 @@ const routes = [
path: '/listDetail', path: '/listDetail',
name: 'ListDetail', name: 'ListDetail',
meta: { meta: {
title: '库存列表详情' title: '库存导入详情'
}, },
component: () => import('../views/Store/listDetail.vue') component: () => import('../views/Store/listDetail.vue')
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
}) })
}, },
downwj() { downwj() {
this.$http('get', "/api/uploadSku/downUploadCsv", {}).then(res => { this.$http('post', "/api/uploadSku/downUploadCsv", {}).then(res => {
}) })
}, },
......
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<div class="fl dcg">导出</div> <div class="fl dcg" @click="downOut">导出</div>
<div class="fl dcg heti">上架</div> <div class="fl dcg heti" @click="changeStatus(1)">上架</div>
<div class="fl dcg heti xjk" @click="handleClose">下架</div> <div class="fl dcg heti xjk" @click="changeStatus(3)">下架</div>
</div> </div>
<div class="data-box"> <div class="data-box">
<el-table :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange"> <el-table :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange">
...@@ -85,13 +85,13 @@ ...@@ -85,13 +85,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="hk_delivery_time" label="香港交货价($)" width="150"> <el-table-column prop="hk_ladder_price" label="香港交货价($)" width="150">
<template slot-scope="scope" v-if="scope.row.hk_delivery_time&&scope.row.hk_delivery_time.length>0"> <template slot-scope="scope" v-if="scope.row.hk_ladder_price&&scope.row.hk_ladder_price.length>0">
<div class="price-more"> <div class="price-more">
<el-tooltip placement="bottom" effect="light"> <el-tooltip placement="bottom" effect="light">
<div slot="content"> <div slot="content">
<div class="boxxrth2021"> <div class="boxxrth2021">
<p class="clr" v-for="item in scope.row.hk_delivery_time"> <p class="clr" v-for="item in scope.row.hk_ladder_price">
<span class="fl">{{item.purchases}}+</span> <span class="fl">{{item.purchases}}+</span>
<span class="fl">&yen;{{item.price}}</span> <span class="fl">&yen;{{item.price}}</span>
</p> </p>
...@@ -132,11 +132,12 @@ ...@@ -132,11 +132,12 @@
</el-table-column> </el-table-column>
<el-table-column prop="brand_name" label="品牌" min-width="25%"> <el-table-column prop="brand_name" label="品牌" min-width="25%">
</el-table-column> </el-table-column>
<el-table-column prop="inquiry_number" label="库存数量" min-width="25%"> <el-table-column prop="stock" label="库存数量" min-width="25%">
</el-table-column> </el-table-column>
<el-table-column label="修改库存" min-width="25%"> <el-table-column label="修改库存" min-width="25%">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="updateKc" placeholder="点击修改"
<el-input v-model="scope.row.updateStock" placeholder="点击修改"
onkeyup="if(event.keyCode !=37 &amp;&amp; event.keyCode != 39){if (!/^[\d]+$/ig.test(this.value)){this.value='';}}"> onkeyup="if(event.keyCode !=37 &amp;&amp; event.keyCode != 39){if (!/^[\d]+$/ig.test(this.value)){this.value='';}}">
</el-input> </el-input>
</template> </template>
...@@ -146,7 +147,7 @@ ...@@ -146,7 +147,7 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button> <el-button type="primary" @click="submitKc">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!--修改交期弹窗--> <!--修改交期弹窗-->
...@@ -159,16 +160,15 @@ ...@@ -159,16 +160,15 @@
</el-table-column> </el-table-column>
<el-table-column prop="brand_name" label="品牌" min-width="20%"> <el-table-column prop="brand_name" label="品牌" min-width="20%">
</el-table-column> </el-table-column>
<el-table-column prop="inquiry_number" label="库存数量" min-width="20%"> <el-table-column prop="stock" label="库存数量" min-width="20%">
</el-table-column> </el-table-column>
<el-table-column label="修改大陆交期" min-width="20%"> <el-table-column label="修改大陆交期" min-width="20%">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="updatebox"> <div class="updatebox">
<el-input v-model="updateHqdl" placeholder="点击修改" <el-input v-model="updateHqdl" placeholder="如:2-5" @change="changedl(scope.row)">
onkeyup="if(event.keyCode !=37 &amp;&amp; event.keyCode != 39){if (!/^[\d]+$/ig.test(this.value)){this.value='';}}">
</el-input> </el-input>
<div class="selectdw"> <div class="selectdw">
<el-select v-model="updateHqdldw"> <el-select v-model="updateHqdldw" @change="changedl(scope.row)">
<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>
...@@ -180,8 +180,7 @@ ...@@ -180,8 +180,7 @@
<el-table-column label="修改香港交期" min-width="20%"> <el-table-column label="修改香港交期" min-width="20%">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="updatebox"> <div class="updatebox">
<el-input v-model="updateHqhk" placeholder="点击修改" <el-input v-model="updateHqhk" placeholder="如:2-5">
onkeyup="if(event.keyCode !=37 &amp;&amp; event.keyCode != 39){if (!/^[\d]+$/ig.test(this.value)){this.value='';}}">
</el-input> </el-input>
<div class="selectdw"> <div class="selectdw">
<el-select v-model="updateHqhkdw"> <el-select v-model="updateHqhkdw">
...@@ -238,7 +237,7 @@ ...@@ -238,7 +237,7 @@
data() { data() {
return { return {
total: 0, total: 0,
limit: 1, limit: 10,
page: 1, page: 1,
dialogVisible: false, dialogVisible: false,
dialogVisible2: false, dialogVisible2: false,
...@@ -251,77 +250,16 @@ ...@@ -251,77 +250,16 @@
}, },
multipleSelection: [], multipleSelection: [],
selectData: [],
updateKc: "", updateKc: "",
updateHq: "", updateHq: "",
updateHqdl: "", updateHqdl: "",
updateHqdldw: "天", updateHqdldw: "天",
updateHqhk: "", updateHqhk: "",
updateHqhkdw: "天", updateHqhkdw: "天",
huoqidata: [{ huoqidata: [],
"id": 318, kucundata: [],
"inquiry_sn": "X2021050609556", tableData: []
"goods_name": "M4",
"brand_name": "TR FASTENINGS",
"inquiry_number": 1,
"batch": "1",
"delivery_time": "1天",
"status_val": "已报价(1)",
"quote_count": 1,
"currency": 1,
"status_a": 1,
"user_name": "admin",
"create_name": "admin@ichunt.com",
"create_time": "2021-05-08 09:41:42"
}, ],
kucundata: [{
"id": 318,
"inquiry_sn": "X2021050609556",
"goods_name": "M4",
"brand_name": "TR FASTENINGS",
"inquiry_number": 1,
"batch": "1",
"delivery_time": "1天",
"status_val": "已报价(1)",
"quote_count": 1,
"currency": 1,
"status_a": 1,
"user_name": "admin",
"create_name": "admin@ichunt.com",
"create_time": "2021-05-08 09:41:42"
}, ],
tableData: [{
"id": 318,
"inquiry_sn": "X2021050609556",
"goods_name": "M4",
"brand_name": "TR FASTENINGS",
"inquiry_number": 1,
"batch": "1",
"delivery_time": "1天",
"status_val": "已报价(1)",
"quote_count": 1,
"currency": 1,
"status_a": 1,
"user_name": "admin",
"create_name": "admin@ichunt.com",
"create_time": "2021-05-08 09:41:42"
},
{
"id": 318,
"inquiry_sn": "X2021050609556",
"goods_name": "M4",
"brand_name": "TR FASTENINGS",
"inquiry_number": 1,
"batch": "1",
"delivery_time": "1天",
"status_val": "已报价(1)",
"quote_count": 1,
"currency": 1,
"status_a": 1,
"user_name": "admin",
"create_name": "admin@ichunt.com",
"create_time": "2021-05-08 09:41:42"
}
]
}; };
}, },
...@@ -350,6 +288,38 @@ ...@@ -350,6 +288,38 @@
} }
}) })
}, },
submitKc() {
var arr_={}
var self=this;
for(var i=0;i<self.kucundata.length;i++){
arr_[self.kucundata[i]['goods_id']]={stock:self.kucundata[i]['updateStock']}
console.log(self.kucundata[i]['goods_id'])
}
console.log(arr_)
this.$http('post', "/api/sku/updateSku", arr_).then(res => {
if (res.err_code === 0) {
Message("修改成功");
this.getData()
this.dialogVisible = false
} else {
Message(res.err_msg);
}
})
},
changedl(item) {
console.log(item)
},
downOut() {
this.$http('get', "/api/sku/exportSku", {
page: this.page,
limit: this.limit,
status: this.formInline.status,
brand_id: this.formInline.brand_id,
action_time: this.formInline.date[0],
end_time: this.formInline.date[1]
}).then(res => {})
},
onSubmit() { onSubmit() {
this.page = 1; this.page = 1;
this.getData(); this.getData();
...@@ -360,28 +330,44 @@ ...@@ -360,28 +330,44 @@
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
console.log(this.multipleSelection)
}, },
handleCommand(command) { handleCommand(command) {
console.log(command) if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据")
return
}
this.selectData = JSON.parse(JSON.stringify(this.multipleSelection));
if (command == 1) { if (command == 1) {
//修改库存弹窗 //修改库存弹窗
this.dialogVisible = true this.dialogVisible = true
this.kucundata = this.selectData
} else { } else {
//修改货期弹窗 //修改货期弹窗
this.dialogVisible2 = true this.dialogVisible2 = true
this.kucundata = this.selectData
} }
}, },
handleClose(done) { changeStatus(status) {
MessageBox.confirm('确认关闭?', {
type: 'error'
}) if (this.multipleSelection.length == 0) {
.then(() => { Message("请至少选择一条数据")
done(); return
}) }
.catch(() => {}); var arr = [];
for (var i = 0; i < this.multipleSelection.length; i++) {
arr.push(this.multipleSelection[i]['goods_id'])
}
this.$http('post', "/api/sku/updateSkuStatus", {
sku_ids: arr.join(","),
status: status == 1 ? 'passed' : 'offshelf'
}).then(res => {
if (res.err_code === 0) {
Message("操作成功");
this.getData()
} else {
Message(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