Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

肖康 / cloudSystem

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 83dfe960 authored 2 years ago by LJM's avatar LJM
Browse files
Options
  • _('Browse Files')
  • Download
  • Email Patches
  • Plain Diff

取消发货

parent 6f937fdc
Hide whitespace changes
Inline Side-by-side
Showing with 170 additions and 171 deletions
  • src/views/OrderTrack/goods.vue
  • src/views/OrderTrack/invoice.vue
  • src/views/OrderTrack/purAdd.vue
src/views/OrderTrack/goods.vue
View file @ 83dfe960
...@@ -124,7 +124,6 @@ ...@@ -124,7 +124,6 @@
source_type: this.formInline.source_type, source_type: this.formInline.source_type,
}).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.total) || 0; this.total = Number(res.data.total) || 0;
} else { } else {
......
This diff is collapsed. Click to expand it.
src/views/OrderTrack/invoice.vue
View file @ 83dfe960
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</el-form-item> </el-form-item>
<el-form-item label="型号" prop="goods_name"> <el-form-item label="型号" prop="goods_name">
<el-autocomplete v-model="formInline.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" <el-autocomplete v-model="formInline.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit"
:fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete> :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="品牌" prop="brand_name"> <el-form-item label="品牌" prop="brand_name">
<el-autocomplete v-model="formInline.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" <el-autocomplete v-model="formInline.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit"
:fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete> :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-select v-model="formInline.status" placeholder="请选择"> <el-select v-model="formInline.status" placeholder="请选择">
...@@ -43,181 +43,182 @@ ...@@ -43,181 +43,182 @@
<el-table-column prop="create_name" label="创建人" min-width="100"></el-table-column> <el-table-column prop="create_name" label="创建人" min-width="100"></el-table-column>
<el-table-column prop="purchase_name" label="订单人员" min-width="100"></el-table-column> <el-table-column prop="purchase_name" label="订单人员" min-width="100"></el-table-column>
</el-table> </el-table>
<el-pagination layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 50, 100, 200]" <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>
: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 { import {Autocomplete, Button, Dialog, Form, FormItem, Input, Message, Option, Pagination, Select, Table, TableColumn} from 'element-ui'
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(Autocomplete); Vue.use(TableColumn).use(Table).use(Autocomplete);
export default { export default {
name: "orderTrackInvoice", name: "orderTrackInvoice",
data() { data() {
return { return {
total: 0, total: 0,
limit: 10, limit: 10,
page: 1, page: 1,
formInline: { formInline: {
stock_in_sn: "", stock_in_sn: "",
goods_name: '', goods_name: '',
brand_name: '', brand_name: '',
status: '' status: ''
}, },
tableData: "", tableData: "",
multipleSelection: [], //选择数据 multipleSelection: [], //选择数据
}; };
},
created() {
this.getData();
},
computed: {},
methods: {
getData() {
this.$http('post', "/api/purchase/getDeliveryList", {
page: this.page,
limit: this.limit,
stock_in_sn: this.formInline.stock_in_sn,
brand_name: this.formInline.brand_name,
goods_name: this.formInline.goods_name,
status: this.formInline.status,
}).then(res => {
if (res.code === 0) {
this.tableData = res.data.list || [];
this.total = Number(res.data.total) || 0;
} else {
this.$message(res.msg);
}
})
},
handleCurrentChange(val) {
this.page = val;
this.getData();
}, },
created() { handleSizeChange(val) {
this.limit = val;
this.getData(); this.getData();
}, },
computed: {}, handleSelectionChange(val) {
methods: { this.multipleSelection = val;
getData() { },
this.$http('post', "/api/purchase/getDeliveryList", { submit() {
page: this.page, this.page = 1;
limit: this.limit, this.getData();
stock_in_sn: this.formInline.stock_in_sn, },
brand_name: this.formInline.brand_name, resetForm(formName) {
goods_name: this.formInline.goods_name, this.$refs[formName].resetFields();
status: this.formInline.status, },
//取消发货
cancelSend() {
if (this.multipleSelection.length <= 0) {
this.$message({
message: "请勾选数据进行操作",
type: 'warning'
});
return
}
}).then(res => { let stock_in_ids = [];
if (res.code === 0) { stock_in_ids = this.multipleSelection.map(obj => {
return obj.stock_in_id;
})
this.tableData = res.data.list || []; let source_arr = [];
this.total = Number(res.data.total) || 0; let status_arr = [];
} else { source_arr = this.multipleSelection.map(obj => {
this.$message(res.msg); return obj.source;
} })
}) status_arr = this.multipleSelection.map(obj => {
}, return obj.status;
handleCurrentChange(val) { })
this.page = val; let source = source_arr.every(ele => ele === 2)
this.getData(); if (source) {
}, let status = status_arr.every(ele => ele === 2)
handleSizeChange(val) { if (status) {
this.limit = val; this.$http('POST', "/api/purchase/cancelSupDelivery", {stock_in_ids: stock_in_ids.join(',')}).then(res => {
this.getData(); if (res.code == 0) {
}, this.$message({
handleSelectionChange(val) { message: "操作成功",
this.multipleSelection = val; type: 'success',
}, duration: 2000,
submit() { onClose() {
this.page = 1; this.getData();
this.getData(); }
}, });
resetForm(formName) { } else {
this.$refs[formName].resetFields(); this.$message({
}, message: '请选择作废待入库状态',
//取消发货 type: 'error'
cancelSend() { });
if (this.multipleSelection.length == 0) { }
this.$message({ })
message: "请选择一条数据进行操作", } else {
type: 'warning'
});
return
}
if (this.multipleSelection.length != 1) {
this.$message({ this.$message({
message: "只能单条操作", message: '请选择云芯系统的发货单',
type: 'warning' 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 => { } else {
if (res.code == 0) { this.$message({
this.$message({ message: '请选择云芯系统的发货单',
message: "操作成功", type: 'warning'
type: 'success' });
}); }
this.getData(); },
} else { //型号
this.$message({ querySearchAsync(queryString, cb) {
message: res.msg, this.$http('get', "/api/search/getspu", {
type: 'error' spu_name: queryString
}); }).then(res => {
} if (res.code == 0) {
}) if (res.data.list.length > 0) {
}, var arrlist_ = res.data.list || [];
//型号 var arr_ = []
querySearchAsync(queryString, cb) { for (var i = 0; i < arrlist_.length; i++) {
this.$http('get', "/api/search/getspu", { arr_.push({
spu_name: queryString value: arrlist_[i]['spu_name']
}).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([]);
} }
cb(arr_);
} else {
cb([]);
} }
}) }
}, })
//品牌 },
querySearchAsyncBrand(queryString, cb) { //品牌
this.$http('get', "/api/brand/get_stand_brand", { querySearchAsyncBrand(queryString, cb) {
brand: queryString this.$http('get', "/api/brand/get_stand_brand", {
}).then(res => { brand: queryString
if (res.code == 0) { }).then(res => {
if (res.data.list.length > 0) { if (res.code == 0) {
var arrlist_ = res.data.list || []; if (res.data.list.length > 0) {
var arr_ = [] var arrlist_ = res.data.list || [];
for (var i = 0; i < arrlist_.length; i++) { var arr_ = []
arr_.push({ for (var i = 0; i < arrlist_.length; i++) {
value: arrlist_[i] arr_.push({
}) value: arrlist_[i]
} })
cb(arr_);
} else {
cb([]);
} }
cb(arr_);
} else {
cb([]);
} }
}) }
}, })
}, },
components: { },
Menu components: {
} Menu
}; }
};
</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
This diff is collapsed. Click to expand it.
src/views/OrderTrack/purAdd.vue
View file @ 83dfe960
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</div> </div>
</el-form> </el-form>
<div class="data-box th-all"> <div class="data-box th-all">
<el-table :data="purOrderDetail.purchase_item_list" border max-height="600" :row-class-name="tableRowClassName" @selection-change="handleSelectionChange" @select="onRowClick"> <el-table :data="purOrderDetail.purchase_item_list" 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="goods_name" label="型号" min-width="15%"></el-table-column> <el-table-column prop="goods_name" label="型号" min-width="15%"></el-table-column>
<el-table-column prop="brand_name" label="品牌" min-width="15%"></el-table-column> <el-table-column prop="brand_name" label="品牌" min-width="15%"></el-table-column>
...@@ -78,7 +78,6 @@ export default { ...@@ -78,7 +78,6 @@ export default {
purOrderDetail: {},//基本信息,发货信息 purOrderDetail: {},//基本信息,发货信息
purchase_uid: '', purchase_uid: '',
multipleSelection: [],//选中的数据 multipleSelection: [],//选中的数据
currentRowIndex: [],//选中数据的索引
rules: { rules: {
shipping_id: [{ shipping_id: [{
required: true, required: true,
...@@ -141,15 +140,6 @@ export default { ...@@ -141,15 +140,6 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
tableRowClassName({row, rowIndex}) {
row.row_index = rowIndex
},
onRowClick(row) {
this.currentRowIndex = []
for (var i = 0; i < row.length; i++) {
this.currentRowIndex.push(row[i].row_index)
}
},
submit(formName) { submit(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
...@@ -161,10 +151,18 @@ export default { ...@@ -161,10 +151,18 @@ export default {
return false; return false;
} }
this.formParam.itemlist = JSON.stringify(this.itemlist); let filterArr = [];
for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.multipleSelection[i].purchase_item_id == this.itemlist[i].purchase_item_id) {
filterArr.push(this.itemlist[i])
}
}
this.formParam.itemlist = filterArr;
this.$http('POST', "/api/purchase/addSupDelivery", this.formParam).then(res => { this.$http('POST', "/api/purchase/addSupDelivery", this.formParam).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$router.push({
path: "/orderTrackGoods",
})
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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