Commit 5191a164 by 肖康

订单追

parent 36b948fa
<template> <template>
<section class="goods pagex"> <section class="goods pagex">
<div class="goods-con"> <div class="goods-con">
<el-form :inline="true" :model="formInline" label-width="80px"> <el-form :inline="true" :model="formInline" label-width="80px" ref="formInline">
<el-form-item label="型号"> <el-form-item label="型号" prop="goods_name">
<el-input v-model="formInline.keyword" placeholder="请输入型号" @keyup.enter.native="submit"></el-input> <el-autocomplete v-model="formInline.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit"
</el-form-item> :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete>
<el-form-item label="品牌"> </el-form-item>
<el-input v-model="formInline.keyword" placeholder="请输入品牌" @keyup.enter.native="submit"></el-input> <el-form-item label="品牌" prop="brand_name">
</el-form-item> <el-autocomplete v-model="formInline.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit"
<el-form-item label="订单状态"> :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete>
<el-select v-model="formInline.keyword" placeholder="请选择"> </el-form-item>
<el-option label="全部" value=""></el-option> <el-form-item label="订单状态" prop="status">
<el-option label="进行中" value="1"></el-option> <el-select v-model="formInline.status" placeholder="请选择">
<el-option label="已完成" value="2"></el-option> <el-option label="全部" value=""></el-option>
<el-option label="已作废" value="3"></el-option> <el-option label="进行中" value="1"></el-option>
</el-select> <el-option label="已完成" value="2"></el-option>
</el-form-item> <el-option label="已作废" value="3"></el-option>
<el-form-item label="发货状态"> </el-select>
<el-select v-model="formInline.keyword" placeholder="请选择"> </el-form-item>
<el-option label="全部" value=""></el-option> <el-form-item label="发货状态" prop="shipping_status">
<el-option label="待发货" value="1"></el-option> <el-select v-model="formInline.shipping_status" placeholder="请选择">
<el-option label="部分发货" value="2"></el-option> <el-option label="全部" value=""></el-option>
<el-option label="全部发货" value="3"></el-option> <el-option label="待发货" value="1"></el-option>
</el-select> <el-option label="部分发货" value="2"></el-option>
</el-form-item> <el-option label="全部发货" value="3"></el-option>
<el-form-item label="收款状态"> </el-select>
<el-select v-model="formInline.keyword" placeholder="请选择"> </el-form-item>
<el-option label="全部" value=""></el-option> <el-form-item label="收款状态" prop="pay_status">
<el-option label="待收款" value="1"></el-option> <el-select v-model="formInline.pay_status" placeholder="请选择">
<el-option label="部分收款" value="2"></el-option> <el-option label="全部" value=""></el-option>
<el-option label="全部收款" value="3"></el-option> <el-option label="待收款" value="1"></el-option>
</el-select> <el-option label="部分收款" value="2"></el-option>
</el-form-item> <el-option label="全部收款" value="3"></el-option>
<el-form-item label="报价单号"> </el-select>
<el-input v-model="formInline.keyword" placeholder="请输入型号" @keyup.enter.native="submit"></el-input> </el-form-item>
</el-form-item> <el-form-item label="报价单号" prop="quote_sn">
<el-form-item> <el-input v-model="formInline.quote_sn" placeholder="请输入型号" @keyup.enter.native="submit"></el-input>
<el-button type="primary" @click="submit">查询</el-button> </el-form-item>
<el-button>重置</el-button> <el-form-item label="订单来源" prop="source">
</el-form-item> <el-select v-model="formInline.source" placeholder="请选择">
</el-form> <el-option label="全部" value=""></el-option>
<div class="btn-nav clr"> <el-option label="云芯采购" value="1"></el-option>
<el-button type="primary">生成发货单</el-button> <el-option label="正常采购" value="2"></el-option>
</div> </el-select>
<div class="data-box th-all" v-if="tableData"> </el-form-item>
<el-table :data="tableData" border max-height="600"@selection-change="handleSelectionChange"> <el-form-item>
<el-table-column fixed type="selection" width="37"></el-table-column> <el-button type="primary" @click="submit">查询</el-button>
<el-table-column prop="spu_name" label="订货公司" min-width="15%"></el-table-column> <el-button @click="resetForm('formInline')">重置</el-button>
<el-table-column prop="brand_name" label="订单状态" min-width="15%"></el-table-column> </el-form-item>
<el-table-column prop="encap" label="对方付款方式" min-width="15%"></el-table-column> </el-form>
<el-table-column prop="pdf" label="收款状态" min-width="15%"></el-table-column> <div class="btn-nav clr">
<el-table-column prop="images_l" label="发货状态" min-width="15%"></el-table-column> <el-button type="primary">生成发货单</el-button>
<el-table-column prop="remark" label="币种" min-width="15%"></el-table-column> </div>
<el-table-column prop="create_time" label="订单金额" min-width="15%"></el-table-column> <div class="data-box th-all" v-if="tableData">
<el-table-column prop="update_time" label="订单人员" min-width="15%"></el-table-column> <el-table :data="tableData" border max-height="600" @selection-change="handleSelectionChange">
<el-table-column prop="update_time" label="订单来源" min-width="15%"></el-table-column> <el-table-column fixed type="selection" width="37"></el-table-column>
<el-table-column prop="update_time" label="创建时间" min-width="15%"></el-table-column> <el-table-column prop="company_name" label="订货公司" min-width="15%"></el-table-column>
</el-table> <el-table-column prop="status_val" label="订单状态" min-width="15%"></el-table-column>
<el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total" @current-change="handleCurrentChange" :current-page="page"></el-pagination> <el-table-column prop="pay_name" label="对方付款方式" min-width="15%"></el-table-column>
</div> <el-table-column prop="pay_status_val" label="收款状态" min-width="15%"></el-table-column>
</div> <el-table-column prop="shipping_status_val" label="发货状态" min-width="15%"></el-table-column>
<Menu/> <el-table-column prop="currency_val" label="币种" min-width="15%"></el-table-column>
</section> <el-table-column prop="purchase_amount" label="订单金额" min-width="15%"></el-table-column>
<el-table-column prop="purchase_name" label="订单人员" min-width="15%"></el-table-column>
<el-table-column prop="source_type" label="订单来源" min-width="15%"></el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="15%"></el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 50, 100, 200]"
:total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page">
</el-pagination>
</div>
</div>
<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 {Form, FormItem, Select, Option, Input, Button, Table, TableColumn, Message, Dialog, Pagination, Autocomplete, Cascader} from 'element-ui' import {
Form,
FormItem,
Select,
Option,
Input,
Button,
Table,
TableColumn,
Message,
Dialog,
Pagination,
Autocomplete,
Cascader
} from 'element-ui'
Vue.prototype.$message = Message; Vue.prototype.$message = Message;
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination); Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination);
...@@ -75,25 +100,19 @@ ...@@ -75,25 +100,19 @@
name: "orderTrackGoods", name: "orderTrackGoods",
data() { data() {
return { return {
dialogVisible: false,
updateGoodsdata: [],
total: 0, total: 0,
limit: 10, limit: 10,
page: 1, page: 1,
downHref: "",
formInline: { formInline: {
goods_name: '', goods_name: '',
brand_name: '', brand_name: '',
brand_id: '', shipping_status: '',
keyword: '', status: '',
class_id2: '', pay_status: '',
class_id1: '' quote_sn: '',
source: '',
}, },
disabled: false,
timer: null,
tableData: "", tableData: "",
multipleSelection: [],
options: [],
selectedOptions: [] selectedOptions: []
}; };
}, },
...@@ -103,23 +122,26 @@ ...@@ -103,23 +122,26 @@
computed: {}, computed: {},
methods: { methods: {
getData() { getData() {
this.$http('get', "/api/spu/get_spu_list", { this.$http('post', "/api/purchase/getPurchaseList", {
page: this.page, page: this.page,
limit: this.limit, limit: this.limit,
brand_id: this.formInline.brand_id,
brand_name: this.formInline.brand_name, brand_name: this.formInline.brand_name,
spu_name: this.formInline.goods_name, goods_name: this.formInline.goods_name,
keyword: this.formInline.keyword, shipping_status: this.formInline.shipping_status,
class_id2: this.formInline.class_id2, status: this.formInline.status,
class_id1: this.formInline.class_id1 pay_status: this.formInline.pay_status,
quote_sn: this.formInline.quote_sn,
source: this.formInline.source,
}).then(res => { }).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.total) || 0;
} else { } else {
this.$message(res.msg); this.$message({
message: res.msg,
type: "error"
});
} }
}) })
}, },
...@@ -130,14 +152,59 @@ ...@@ -130,14 +152,59 @@
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleSizeChange(val) {
this.limit = val;
this.getData();
},
submit() { submit() {
if (this.formInline.keyword && this.formInline.keyword.length == 1) {
this.$message("关键词不能少于2个字符");
return
}
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
resetForm(formName) {
this.$refs[formName].resetFields();
},
//型号
querySearchAsync(queryString, cb) {
this.$http('get', "/api/search/getspu", {
spu_name: queryString
}).then(res => {
if (res.code == 0) {
if (res.data.list.length > 0) {
var arrlist_ = res.data.list || [];
var arr_ = []
for (var i = 0; i < arrlist_.length; i++) {
arr_.push({
value: arrlist_[i]['spu_name']
})
}
cb(arr_);
} else {
cb([]);
}
}
})
},
//品牌
querySearchAsyncBrand(queryString, cb) {
this.$http('get', "/api/brand/get_stand_brand", {
brand: queryString
}).then(res => {
if (res.code == 0) {
if (res.data.list.length > 0) {
var arrlist_ = res.data.list || [];
var arr_ = []
for (var i = 0; i < arrlist_.length; i++) {
arr_.push({
value: arrlist_[i]
})
}
cb(arr_);
} else {
cb([]);
}
}
})
},
}, },
components: { components: {
Menu Menu
...@@ -145,5 +212,5 @@ ...@@ -145,5 +212,5 @@
}; };
</script> </script>
<style scoped> <style scoped>
@import "../../assets/css/goods/goods.min.css"; @import "../../assets/css/goods/goods.min.css";
</style> </style>
\ No newline at end of file
<template> <template>
<section class="goods pagex"> <section class="goods pagex">
<div class="goods-con"> <div class="goods-con">
<el-form :inline="true" :model="formInline" label-width="80px"> <el-form :inline="true" :model="formInline" label-width="80px" ref="formInline">
<el-form-item label="发货单号"> <el-form-item label="发货单号" prop="stock_in_sn">
<el-input v-model="formInline.keyword" placeholder="请输入发货单号" @keyup.enter.native="submit"></el-input> <el-input v-model="formInline.stock_in_sn" placeholder="请输入发货单号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="型号"> <el-form-item label="型号" prop="goods_name">
<el-input v-model="formInline.keyword" placeholder="请输入型号" @keyup.enter.native="submit"></el-input> <el-autocomplete v-model="formInline.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit"
:fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="品牌"> <el-form-item label="品牌" prop="brand_name">
<el-input v-model="formInline.keyword" placeholder="请输入品牌" @keyup.enter.native="submit"></el-input> <el-autocomplete v-model="formInline.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit"
:fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态" prop="status">
<el-select v-model="formInline.keyword" placeholder="请选择"> <el-select v-model="formInline.status" placeholder="请选择">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="待到货" value="1"></el-option> <el-option label="待处理" value="-1"></el-option>
<el-option label="完成" value="2"></el-option> <el-option label="完成" value="2"></el-option>
<el-option label="作废" value="3"></el-option> <el-option label="作废" value="-3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="submit">查询</el-button> <el-button type="primary" @click="submit">查询</el-button>
<el-button>重置</el-button> <el-button @click="resetForm('formInline')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn-nav clr"> <div class="btn-nav clr">
<el-button type="primary">取消发货</el-button> <el-button type="primary" @click="cancelSend">取消发货</el-button>
</div> </div>
<div class="data-box th-all" v-if="tableData"> <div class="data-box th-all" v-if="tableData">
<el-table :data="tableData" border max-height="600" @selection-change="handleSelectionChange"> <el-table :data="tableData" border max-height="600" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" width="37"></el-table-column> <el-table-column fixed type="selection" width="37"></el-table-column>
<el-table-column prop="spu_name" label="发货单号" min-width="15%"></el-table-column> <el-table-column prop="stock_in_sn" label="发货单号" width="160"></el-table-column>
<el-table-column prop="brand_name" label="型号" min-width="15%"></el-table-column> <el-table-column prop="goods_name" label="型号" min-width="150"></el-table-column>
<el-table-column prop="encap" label="品牌" min-width="15%"></el-table-column> <el-table-column prop="brand_name" label="品牌" min-width="150"></el-table-column>
<el-table-column prop="pdf" label="发货数量" min-width="15%"></el-table-column> <el-table-column prop="out_qty" label="发货数量" min-width="80"></el-table-column>
<el-table-column prop="images_l" label="到货数量" min-width="15%"></el-table-column> <el-table-column prop="in_qty" label="到货数量" min-width="80"></el-table-column>
<el-table-column prop="remark" label="状态" min-width="15%"></el-table-column> <el-table-column prop="status_val" label="状态" min-width="60"></el-table-column>
<el-table-column prop="create_time" label="物流公司" min-width="15%"></el-table-column> <el-table-column prop="shipping_name" label="物流公司" min-width="80"></el-table-column>
<el-table-column prop="update_time" label="物流单号" min-width="15%"></el-table-column> <el-table-column prop="create_time" label="创建时间" width="150"></el-table-column>
<el-table-column prop="update_time" label="创建时间" min-width="15%"></el-table-column> <el-table-column prop="create_name" label="创建人" min-width="100"></el-table-column>
<el-table-column prop="update_time" label="创建人" min-width="15%"></el-table-column> <el-table-column prop="purchase_name" label="订单人员" min-width="100"></el-table-column>
<el-table-column prop="update_time" label="订单人员" min-width="15%"></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="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 50, 100, 200]"
:total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page">
</el-pagination>
</div> </div>
</div> </div>
<Menu/> <Menu />
</section> </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 {Form, FormItem, Select, Option, Input, Button, Table, TableColumn, Message, Dialog, Pagination, Autocomplete, Cascader} from 'element-ui' import {
Form,
FormItem,
Select,
Option,
Input,
Button,
Table,
TableColumn,
Message,
Dialog,
Pagination,
Autocomplete
} from 'element-ui'
Vue.prototype.$message = Message; Vue.prototype.$message = Message;
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination); Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination);
Vue.use(TableColumn).use(Table).use(Cascader).use(Autocomplete); Vue.use(TableColumn).use(Table).use(Autocomplete);
export default { export default {
name: "orderTrackInvoice", name: "orderTrackInvoice",
data() { data() {
return { return {
dialogVisible: false,
updateGoodsdata: [],
total: 0, total: 0,
limit: 10, limit: 10,
page: 1, page: 1,
downHref: "",
formInline: { formInline: {
stock_in_sn: "",
goods_name: '', goods_name: '',
brand_name: '', brand_name: '',
brand_id: '', status: ''
keyword: '',
class_id2: '',
class_id1: ''
}, },
disabled: false,
timer: null,
tableData: "", tableData: "",
multipleSelection: [], multipleSelection: [], //选择数据
options: [],
selectedOptions: []
}; };
}, },
created() { created() {
...@@ -88,21 +96,19 @@ ...@@ -88,21 +96,19 @@
computed: {}, computed: {},
methods: { methods: {
getData() { getData() {
this.$http('get', "/api/spu/get_spu_list", { this.$http('post', "/api/purchase/getDeliveryList", {
page: this.page, page: this.page,
limit: this.limit, limit: this.limit,
brand_id: this.formInline.brand_id, stock_in_sn: this.formInline.stock_in_sn,
brand_name: this.formInline.brand_name, brand_name: this.formInline.brand_name,
spu_name: this.formInline.goods_name, goods_name: this.formInline.goods_name,
keyword: this.formInline.keyword, status: this.formInline.status,
class_id2: this.formInline.class_id2,
class_id1: this.formInline.class_id1
}).then(res => { }).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.total) || 0;
} else { } else {
this.$message(res.msg); this.$message(res.msg);
} }
...@@ -112,17 +118,100 @@ ...@@ -112,17 +118,100 @@
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
handleSizeChange(val) {
this.limit = val;
this.getData();
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
submit() { submit() {
if (this.formInline.keyword && this.formInline.keyword.length == 1) {
this.$message("关键词不能少于2个字符");
return
}
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
resetForm(formName) {
this.$refs[formName].resetFields();
},
//取消发货
cancelSend() {
if (this.multipleSelection.length == 0) {
this.$message({
message: "请选择一条数据进行操作",
type: 'warning'
});
return
}
if (this.multipleSelection.length != 1) {
this.$message({
message: "只能单条操作",
type: 'warning'
});
return
}
var obj_ = {
"supplier_id": this.multipleSelection[0].supplier_id, //供应商id
"cancelStockInList": [{
"stock_in_id": this.multipleSelection[0].stock_in_id, //发货单id
"purchase_uid": this.multipleSelection[0].purchase_uid //采购员id
}]
}
this.$http('post', "/open/yunXin/cancelSupDelivery", obj_).then(res => {
if (res.code == 0) {
this.$message({
message: "操作成功",
type: 'success'
});
this.getData();
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
},
//型号
querySearchAsync(queryString, cb) {
this.$http('get', "/api/search/getspu", {
spu_name: queryString
}).then(res => {
if (res.code == 0) {
if (res.data.list.length > 0) {
var arrlist_ = res.data.list || [];
var arr_ = []
for (var i = 0; i < arrlist_.length; i++) {
arr_.push({
value: arrlist_[i]['spu_name']
})
}
cb(arr_);
} else {
cb([]);
}
}
})
},
//品牌
querySearchAsyncBrand(queryString, cb) {
this.$http('get', "/api/brand/get_stand_brand", {
brand: queryString
}).then(res => {
if (res.code == 0) {
if (res.data.list.length > 0) {
var arrlist_ = res.data.list || [];
var arr_ = []
for (var i = 0; i < arrlist_.length; i++) {
arr_.push({
value: arrlist_[i]
})
}
cb(arr_);
} else {
cb([]);
}
}
})
},
}, },
components: { components: {
Menu Menu
......
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