Commit a9c7115d authored by zhengke's avatar zhengke

修改

parent dab8c7dd
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<div class="content"> <div class="content">
<div style="margin-bottom:20px"> <div style="margin-bottom:20px">
<span>供应商</span> <span>供应商</span>
<el-select style="margin:0 10px" class="w200" @change="msg.pageIndex=1,getList()" v-model="msg.SupplierId" size="small" <el-select style="margin:0 10px" class="w200" @change="msg.pageIndex=1,getList()" v-model="msg.SupplierId"
placeholder="请选择"> size="small" placeholder="请选择">
<el-option label="不限" :value="0"></el-option> <el-option label="不限" :value="0"></el-option>
<el-option v-for="item in SupplierData" :key="item.Id" :label="item.Name" :value="item.ID"> <el-option v-for="item in SupplierData" :key="item.Id" :label="item.Name" :value="item.ID">
</el-option> </el-option>
...@@ -17,30 +17,26 @@ ...@@ -17,30 +17,26 @@
<span>订单号</span> <span>订单号</span>
<div class="searchInput" style="width:250px"> <div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" style="display:inline-block;width:225px;height:30px" <el-input @keyup.enter.native="msg.pageIndex=1,getList()" style="display:inline-block;width:225px;height:30px"
placeholder="请输入订单号搜索" placeholder="请输入订单号搜索" v-model="msg.OrderNo" @clear="msg.pageIndex=1,getList()" size="small" clearable>
v-model="msg.OrderNo" </el-input>
@clear="msg.pageIndex=1,getList()" <span @click="msg.pageIndex=1,getList()" class="el-icon-search"
size="small" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
clearable> </div>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<span>下单时间</span> <span>下单时间</span>
<el-date-picker v-model="dateList" @change="msg.pageIndex=1,getList()" size="small" type="datetimerange" range-separator="至" <el-date-picker v-model="dateList" @change="msg.pageIndex=1,getList()" size="small" type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期"> range-separator="至" value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
<span style="margin-left: 5px">商品名称</span> <span style="margin-left: 5px">商品名称</span>
<div class="searchInput" style="width:250px"> <div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" style="display:inline-block;width:225px;height:30px" <el-input @keyup.enter.native="msg.pageIndex=1,getList()" style="display:inline-block;width:225px;height:30px"
placeholder="请输入商品名称搜索" placeholder="请输入商品名称搜索" v-model="msg.GoodsName" @clear="msg.pageIndex=1,getList()" size="small" clearable>
v-model="msg.GoodsName"
@clear="msg.pageIndex=1,getList()"
size="small"
clearable>
</el-input> </el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span> <span @click="msg.pageIndex=1,getList()" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div> </div>
<el-checkbox v-model="msg.IsOut" :true-label="1" :false-label="0" style="margin-left: 15px"
@change="msg.pageIndex=1,getList()">售后出库</el-checkbox>
</div> </div>
<el-table :data="tableData" v-loading="loading" border style="width: 100%" <el-table :data="tableData" v-loading="loading" border style="width: 100%"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
...@@ -48,82 +44,70 @@ ...@@ -48,82 +44,70 @@
</el-table-column> </el-table-column>
<el-table-column prop="OrderNo" label="订单号" width="220"> <el-table-column prop="OrderNo" label="订单号" width="220">
</el-table-column> </el-table-column>
<el-table-column prop="GoodsName" label="商品名称" width="300px" style="font-size:11px">
<el-table-column prop="GoodsName" label="商品名称" width="300px" style="font-size:11px"> <template slot-scope="scope">
<template slot-scope="scope"> <div>
<div> <span style="font-size:11px">
<span style="font-size:11px"> {{scope.row.GoodsName}}
{{scope.row.GoodsName}} </span>
</span> </div>
</div> </template>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="Specification" label="商品规格"> <el-table-column prop="Specification" label="商品规格">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<span style="font-size:11px"> <span style="font-size:11px">
{{scope.row.Specification}} {{scope.row.Specification}}
</span> </span>
</div> </div>
</template>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="Number" label="购买数量" width="100px"> <el-table-column prop="Number" label="购买数量" width="100px">
</el-table-column> </el-table-column>
<el-table-column prop="Number" label="出库商品" width="300px" style="font-size:11px"> <el-table-column prop="Number" label="出库商品" width="300px" style="font-size:11px">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<span style="font-size:11px"> <span style="font-size:11px">
{{scope.row.NewGoodsName}} {{scope.row.NewGoodsName}}
</span> </span>
<el-tooltip class="item" effect="dark" content="修改商品" placement="top">
<img @click="editGoods(scope.row,scope.$index)" src="../../assets/img/userman/edit1.png" alt="">
<el-tooltip class="item" effect="dark" content="修改商品" placement="top" > </el-tooltip>
<img @click="editGoods(scope.row,scope.$index)" </div>
src="../../assets/img/userman/edit1.png" alt=""> </template>
</el-tooltip>
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="Number" label="出库规格" width="250px"> <el-table-column prop="Number" label="出库规格" width="250px">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color:'#409eff'"> <div style="color:'#409eff'">
<span class="el-tag el-tag--small el-tag--light" style="top: 5px; position: relative; margin-right: 5px;max-width:250px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; "> <span class="el-tag el-tag--small el-tag--light"
{{scope.row.NewSpecification}} style="top: 5px; position: relative; margin-right: 5px;max-width:250px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; ">
</span> {{scope.row.NewSpecification}}
</span>
<el-tooltip class="item" effect="dark" content="修改规格" placement="top" > <el-tooltip class="item" effect="dark" content="修改规格" placement="top">
<img @click="costBtn(scope.row,scope.$index)" <img @click="costBtn(scope.row,scope.$index)" src="../../assets/img/userman/edit1.png" alt="">
src="../../assets/img/userman/edit1.png" alt=""> </el-tooltip>
</el-tooltip> </div>
</div> </template>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="Number" label="出库数量" width="150px"> <el-table-column prop="Number" label="出库数量" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input class="w100" size="small" type="number" v-model="scope.row.NewNumber" placeholder="请输入" :disabled="ERPEmpId==0 ? true: false" :min="0"></el-input> <el-input class="w100" size="small" type="number" v-model="scope.row.NewNumber" placeholder="请输入"
</template> :disabled="ERPEmpId==0 ? true: false" :min="0"></el-input>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize" :current-page.sync="msg.pageIndex" <el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
layout="prev, pager, next" :total="total"> :current-page.sync="msg.pageIndex" layout="prev, pager, next" :total="total">
</el-pagination> </el-pagination>
</div> </div>
<!-- 规格选择 --> <!-- 规格选择 -->
<el-dialog custom-class="app-add-cat" title="出库规格选择" :visible.sync="AtterDig" width="1100px"> <el-dialog custom-class="app-add-cat" title="出库规格选择" :visible.sync="AtterDig" width="1100px">
<div class="temp_content" v-if="SpecList.length>0"> <div class="temp_content" v-if="SpecList.length>0">
<span class="el-tag el-tag--small el-tag--light AttrList"
<span class="el-tag el-tag--small el-tag--light AttrList" :style="{color: item.IScheck == true?'#409eff':'#000'}" :style="{color: item.IScheck == true?'#409eff':'#000'}" v-for="(item,index) in SpecList" :key="index"
v-for="(item,index) in SpecList" :key="index" @click="chooseAttr(index)">
@click="chooseAttr(index)" <span>{{item.SpecificationName}}</span>
> </span>
<span >{{item.SpecificationName}}</span>
</span>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="AtterDig = false">取 消</el-button> <el-button size="small" @click="AtterDig = false">取 消</el-button>
...@@ -132,65 +116,55 @@ ...@@ -132,65 +116,55 @@
</el-dialog> </el-dialog>
<!-- 商品选择 --> <!-- 商品选择 -->
<el-dialog custom-class="app-add-cat" title="出库商品选择" :visible.sync="Egoods" width="1100px"> <el-dialog custom-class="app-add-cat" title="出库商品选择" :visible.sync="Egoods" width="1100px">
<el-form :inline="true" label-width="80px" > <el-form :inline="true" label-width="80px">
<el-form-item label="商品">
<el-form-item label="商品"> <el-select size="small" v-model="Goodsobj.NewGoodsId" @change="getSpecification"
<el-select size="small" v-model="Goodsobj.NewGoodsId" @change="getSpecification" :filter-method="ChangeListName" filterable :filter-method="ChangeListName" filterable style="display:inline-block;width:600px;" placeholder="请选择">
style="display:inline-block;width:600px;" <el-option v-for="item in GoodsList" :key="item.Id" :label="item.Name" :value="item.Id">
placeholder="请选择"> </el-option>
<el-option v-for="item in GoodsList" :key="item.Id" :label="item.Name" :value="item.Id"> </el-select>
</el-option> </el-form-item>
</el-select>
</el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-width="80px" > <el-form :inline="true" label-width="80px">
<el-form-item label="商品规格">
<el-form-item label="商品规格"> <el-select size="small" v-model="Goodsobj.NewSpecificationSort" @change="getSort"
<el-select size="small" v-model="Goodsobj.NewSpecificationSort" @change="getSort" style="display:inline-block;width:300px;" placeholder="请选择">
style="display:inline-block;width:300px;" <el-option v-for="item in SpecificationList" :key="item.SpecificationKey" :label="item.SpecificationName"
placeholder="请选择"> :value="item.SpecificationKey">
<el-option v-for="item in SpecificationList" :key="item.SpecificationKey" :label="item.SpecificationName" :value="item.SpecificationKey"> </el-option>
</el-option> </el-select>
</el-select> </el-form-item>
</el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="addGoods">添加</el-button>
<el-form-item> </el-form-item>
<el-button type="primary" size="small" @click="addGoods">添加</el-button>
</el-form-item>
</el-form> </el-form>
<el-table :data="tableData2" v-loading="loading" border style="width: 100%"> <el-table :data="tableData2" v-loading="loading" border style="width: 100%">
<el-table-column prop="NewGoodsName" label="商品名称"> <el-table-column prop="NewGoodsName" label="商品名称">
</el-table-column> </el-table-column>
<el-table-column prop="Number" label="出库规格" width="250px"> <el-table-column prop="Number" label="出库规格" width="250px">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color:'#409eff'"> <div style="color:'#409eff'">
<span class="el-tag el-tag--small el-tag--light" style="top: 5px; position: relative; margin-right: 5px;max-width:250px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; "> <span class="el-tag el-tag--small el-tag--light"
{{scope.row.NewSpecification}} style="top: 5px; position: relative; margin-right: 5px;max-width:250px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; ">
</span> {{scope.row.NewSpecification}}
</div> </span>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="Number" label="出库数量" width="150px"> <el-table-column prop="Number" label="出库数量" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input class="w100" size="small" type="number" v-model="scope.row.NewNumber" placeholder="请输入" :disabled="ERPEmpId==0 ? true: false" :min="0"></el-input> <el-input class="w100" size="small" type="number" v-model="scope.row.NewNumber" placeholder="请输入"
</template> :disabled="ERPEmpId==0 ? true: false" :min="0"></el-input>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="Number" label="操作" width="100px">
<el-table-column prop="Number" label="操作" width="100px"> <template slot-scope="scope">
<template slot-scope="scope"> <div>
<div> <el-tooltip class="item" effect="dark" content="删除" placement="top">
<el-tooltip class="item" effect="dark" content="删除" placement="top" > <img @click="editGoods2(scope.row,scope.$index)" src="../../assets/img/userman/del.png" alt="">
<img @click="editGoods2(scope.row,scope.$index)" </el-tooltip>
src="../../assets/img/userman/del.png" alt=""> </div>
</el-tooltip> </template>
</div>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -206,63 +180,64 @@ ...@@ -206,63 +180,64 @@
data() { data() {
return { return {
loading: false, loading: false,
Egoods:false, Egoods: false,
tableData:[], tableData: [],
total: 0, total: 0,
outobj:{ outobj: {
ID:0, ID: 0,
WarehouseOutGoodsList:[], WarehouseOutGoodsList: [],
}, },
msg:{ msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
SupplierId:0, SupplierId: 0,
OrderNo:'', OrderNo: '',
StartTime:'', StartTime: '',
EndTime:'', EndTime: '',
GoodsName:'', GoodsName: '',
}, IsOut: 0
goodsmsg:{ },
pageIndex:1, goodsmsg: {
pageSize:5, pageIndex: 1,
Name:'', pageSize: 5,
GoodsStatus:0, Name: '',
IsSelectSellOut:0, GoodsStatus: 0,
CategoryIds:'', IsSelectSellOut: 0,
Id:'', CategoryIds: '',
StartTime:'', Id: '',
EndTime:'', StartTime: '',
OrderBy:0, EndTime: '',
}, OrderBy: 0,
ERPEmpId:0, },
SpecList:[], ERPEmpId: 0,
AtterDig:false, SpecList: [],
outindex:{}, AtterDig: false,
SupplierData: [], //供应商data outindex: {},
dateList: [], //日期 SupplierData: [], //供应商data
GoodsList:[],//商品列表 dateList: [], //日期
GoodsList: [], //商品列表
Goodsobj:{
Id:0, Goodsobj: {
OrderNo:0, Id: 0,
GoodsId:'', OrderNo: 0,
GoodsName:'', GoodsId: '',
Number:0, GoodsName: '',
Specification:'', Number: 0,
SpecificationSort:'', Specification: '',
NewSpecification:'', SpecificationSort: '',
NewSpecificationSort:"", NewSpecification: '',
NewNumber:1, NewSpecificationSort: "",
IScheck:false, NewNumber: 1,
}, IScheck: false,
SpecificationList:[], },
tableData2:[], SpecificationList: [],
editGoodsindex:0, tableData2: [],
editGoodsindex: 0,
} }
}, },
created() { created() {
let currentUser = this.getLocalStorage() let currentUser = this.getLocalStorage()
this.ERPEmpId = currentUser.ERPEmpId this.ERPEmpId = currentUser.ERPEmpId
}, },
mounted() { mounted() {
this.getList(); this.getList();
...@@ -271,21 +246,21 @@ ...@@ -271,21 +246,21 @@
methods: { methods: {
getList() { getList() {
if (this.dateList && this.dateList.length > 0) { if (this.dateList && this.dateList.length > 0) {
this.msg.StartTime = this.dateList[0]; this.msg.StartTime = this.dateList[0];
this.msg.EndTime = this.dateList[1]; this.msg.EndTime = this.dateList[1];
} else { } else {
this.msg.StartTime = ''; this.msg.StartTime = '';
this.msg.EndTime = ''; this.msg.EndTime = '';
} }
this.loading = true; this.loading = true;
this.assetsApipost("/api/WarehouseOut/GetNoOutOrderGoodsList", this.msg, res => { this.assetsApipost("/api/WarehouseOut/GetNoOutOrderGoodsList", this.msg, res => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
// this.tableData = res.data.data; // this.tableData = res.data.data;
this.total = res.data.data.count; this.total = res.data.data.count;
this.tableData = res.data.data.pageData; this.tableData = res.data.data.pageData;
}else{ } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}) })
...@@ -297,58 +272,59 @@ ...@@ -297,58 +272,59 @@
handleSelectionChange(val) { handleSelectionChange(val) {
var selectRow = JSON.parse(JSON.stringify(val)); var selectRow = JSON.parse(JSON.stringify(val));
let array= []; let array = [];
selectRow.forEach(x => { selectRow.forEach(x => {
let obj = {} let obj = {}
obj.OrderGoodsId = x.Id; obj.OrderGoodsId = x.Id;
array.push(obj) array.push(obj)
}); });
this.outobj.WarehouseOutGoodsList = array; this.outobj.WarehouseOutGoodsList = array;
}, },
unique(arr) { unique(arr) {
for (var i = 0, len = arr.length; i < len; i++) { for (var i = 0, len = arr.length; i < len; i++) {
for (var j = i + 1, len = arr.length; j < len; j++) { for (var j = i + 1, len = arr.length; j < len; j++) {
if (arr[i].NewGoodsId === arr[j].NewGoodsId && arr[i].NewSpecificationSort === arr[j].NewSpecificationSort&& arr[i].OrderGoodsId === arr[j].OrderGoodsId) { if (arr[i].NewGoodsId === arr[j].NewGoodsId && arr[i].NewSpecificationSort === arr[j]
arr.splice(j, 1); .NewSpecificationSort && arr[i].OrderGoodsId === arr[j].OrderGoodsId) {
j--; // 每删除一个数j的值就减1 arr.splice(j, 1);
len--; // j值减小时len也要相应减1(减少循环次数,节省性能) j--; // 每删除一个数j的值就减1
} len--; // j值减小时len也要相应减1(减少循环次数,节省性能)
}
} }
return arr; }
}, }
outapplyfor(){ return arr;
},
outapplyfor() {
let that = this let that = this
if(that.ERPEmpId==0){ if (that.ERPEmpId == 0) {
that.Error('您还未授权,暂不能出库'); that.Error('您还未授权,暂不能出库');
}else{ } else {
if (that.outobj.WarehouseOutGoodsList.length == 0) { if (that.outobj.WarehouseOutGoodsList.length == 0) {
that.Info('请选择商品'); that.Info('请选择商品');
return return
} }
let array=[] let array = []
let showtip = false let showtip = false
this.outobj.WarehouseOutGoodsList.forEach(x=>{ this.outobj.WarehouseOutGoodsList.forEach(x => {
this.tableData.forEach(j=>{ this.tableData.forEach(j => {
if(x.OrderGoodsId == j.Id){ if (x.OrderGoodsId == j.Id) {
let obj = {} let obj = {}
obj.OrderGoodsId = j.Id; obj.OrderGoodsId = j.Id;
obj.NewSpecificationSort = j.NewSpecificationSort; obj.NewSpecificationSort = j.NewSpecificationSort;
obj.NewNumber = j.NewNumber; obj.NewNumber = j.NewNumber;
obj.NewGoodsName = j.NewGoodsName; obj.NewGoodsName = j.NewGoodsName;
obj.NewGoodsId = j.NewGoodsId; obj.NewGoodsId = j.NewGoodsId;
array.push(obj) array.push(obj)
if(j.NewNumber=='' || j.NewNumber ==0){ if (j.NewNumber == '' || j.NewNumber == 0) {
showtip =true showtip = true
} }
} }
}) })
}) })
if(showtip == true){ if (showtip == true) {
that.Error('出库数量大于0'); that.Error('出库数量大于0');
return return
} }
array = this.unique(array) array = this.unique(array)
this.outobj.WarehouseOutGoodsList = array; this.outobj.WarehouseOutGoodsList = array;
...@@ -357,16 +333,16 @@ ...@@ -357,16 +333,16 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
that.loading = true; that.loading = true;
that.assetsApipost("/api/WarehouseOut/SetWarehouseOutApply", that.outobj, res => { that.assetsApipost("/api/WarehouseOut/SetWarehouseOutApply", that.outobj, res => {
that.loading = false; that.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
that.Success(res.data.message); that.Success(res.data.message);
that.outobj.WarehouseOutGoodsList = [] that.outobj.WarehouseOutGoodsList = []
that.getList(); that.getList();
}else{ } else {
that.Error(res.data.message); that.Error(res.data.message);
} }
}) })
}).catch(() => { }).catch(() => {
...@@ -377,73 +353,77 @@ ...@@ -377,73 +353,77 @@
}, },
changeNum(row,val){ changeNum(row, val) {
if(val=='' || val == 0 ){//当输入 空和0 的时候做的处理 if (val == '' || val == 0) { //当输入 空和0 的时候做的处理
this.tableData.forEach(x => { this.tableData.forEach(x => {
if(x.Id==row.Id){ if (x.Id == row.Id) {
x.NewNumber=0 x.NewNumber = 0
} }
}); });
} }
}, },
costBtn(obj,index){ costBtn(obj, index) {
this.outindex = index this.outindex = index
if(this.ERPEmpId==0){ if (this.ERPEmpId == 0) {
this.Error('您还未授权,不能修改规格'); this.Error('您还未授权,不能修改规格');
}else{ } else {
this.assetsApipost("/api/WarehouseOut/GetSuppliesMaterialList", {GoodsId:obj.GoodsId}, res => { this.assetsApipost("/api/WarehouseOut/GetSuppliesMaterialList", {
if (res.data.resultCode == 1) { GoodsId: obj.GoodsId
this.SpecList = res.data.data; }, res => {
this.SpecList.forEach(x=>{ if (res.data.resultCode == 1) {
x.IScheck=false; this.SpecList = res.data.data;
if(x.SpecificationKey == obj.NewSpecificationSort){ this.SpecList.forEach(x => {
x.IScheck = false;
x.IScheck=true; if (x.SpecificationKey == obj.NewSpecificationSort) {
x.IScheck = true;
} }
}) })
this.AtterDig = true this.AtterDig = true
}else{ } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}) })
} }
}, },
getSpecification(val){ getSpecification(val) {
//给Goodsobj赋值 //给Goodsobj赋值
this.GoodsList.forEach(x=>{ this.GoodsList.forEach(x => {
if(x.Id == val){ if (x.Id == val) {
this.Goodsobj.NewGoodsId = x.Id; this.Goodsobj.NewGoodsId = x.Id;
this.Goodsobj.NewGoodsName = x.Name; this.Goodsobj.NewGoodsName = x.Name;
} }
}) })
//获取规则列表 //获取规则列表
this.assetsApipost("/api/WarehouseOut/GetSuppliesMaterialList", {GoodsId:val}, res => { this.assetsApipost("/api/WarehouseOut/GetSuppliesMaterialList", {
if (res.data.resultCode == 1) { GoodsId: val
this.SpecificationList = res.data.data; }, res => {
if (res.data.resultCode == 1) {
this.SpecificationList = res.data.data;
}else{ } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}) })
}, },
getSort(val){ getSort(val) {
this.SpecificationList.forEach(x=>{ this.SpecificationList.forEach(x => {
if(x.SpecificationKey == val){ if (x.SpecificationKey == val) {
this.Goodsobj.NewSpecification = x.SpecificationName; this.Goodsobj.NewSpecification = x.SpecificationName;
this.Goodsobj.NewSpecificationSort = x.SpecificationKey; this.Goodsobj.NewSpecificationSort = x.SpecificationKey;
} }
}) })
}, },
editGoods(obj,index){ editGoods(obj, index) {
if(this.ERPEmpId==0){ if (this.ERPEmpId == 0) {
this.Error('您还未授权,不能修改商品'); this.Error('您还未授权,不能修改商品');
}else{ } else {
this.Egoods = true; this.Egoods = true;
this.editGoodsindex = index this.editGoodsindex = index
this.Goodsobj = obj this.Goodsobj = obj
...@@ -451,72 +431,72 @@ ...@@ -451,72 +431,72 @@
this.Goodsobj.NewSpecificationSort = ''; this.Goodsobj.NewSpecificationSort = '';
} }
}, },
ChangeListName(val){ ChangeListName(val) {
this.goodsmsg.Name = val; this.goodsmsg.Name = val;
this.getgoodsList(); this.getgoodsList();
}, },
getgoodsList(){ getgoodsList() {
if(this.goodsmsg.Id==''){ if (this.goodsmsg.Id == '') {
this.goodsmsg.Id=0; this.goodsmsg.Id = 0;
} }
this.apipost("/api/product/GetProductGoodsPageList", this.goodsmsg, res => { this.apipost("/api/product/GetProductGoodsPageList", this.goodsmsg, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
let pageData=res.data.data.pageData; let pageData = res.data.data.pageData;
this.GoodsList = pageData this.GoodsList = pageData
} }
})
},
chooseB(){
//删除当前的对象 把tableData2数组插入当前的位置
this.tableData2.unshift(this.editGoodsindex,0) })
this.tableData.splice(this.editGoodsindex,1) },
Array.prototype.splice.apply(this.tableData, this.tableData2); chooseB() {
this.Egoods = false; //删除当前的对象 把tableData2数组插入当前的位置
this.tableData2=[]
}, this.tableData2.unshift(this.editGoodsindex, 0)
chooseAttr(index){ this.tableData.splice(this.editGoodsindex, 1)
this.SpecList.forEach((x,i)=>{ Array.prototype.splice.apply(this.tableData, this.tableData2);
x.IScheck=false; this.Egoods = false;
if(index == i){ this.tableData2 = []
x.IScheck=true; },
chooseAttr(index) {
this.SpecList.forEach((x, i) => {
x.IScheck = false;
if (index == i) {
x.IScheck = true;
} }
}) })
this.$forceUpdate(); this.$forceUpdate();
}, },
//添加商品的时候选择商品 //添加商品的时候选择商品
addGoods(){ addGoods() {
let that= this let that = this
let obj = Object.assign({},that.Goodsobj) let obj = Object.assign({}, that.Goodsobj)
if(obj.NewGoodsId==''){ if (obj.NewGoodsId == '') {
this.Error('请选择商品') this.Error('请选择商品')
return return
} }
if(obj.NewSpecificationSort==''){ if (obj.NewSpecificationSort == '') {
this.Error('请选择规格') this.Error('请选择规格')
return return
} }
that.tableData2.push(obj) that.tableData2.push(obj)
that.Goodsobj.NewGoodsId = ''; that.Goodsobj.NewGoodsId = '';
that.Goodsobj.NewSpecificationSort = ''; that.Goodsobj.NewSpecificationSort = '';
that.Goodsobj.NewNumber = 1; that.Goodsobj.NewNumber = 1;
}, },
editGoods2(row,index){ editGoods2(row, index) {
this.tableData2.splice(index,1) this.tableData2.splice(index, 1)
}, },
chooseA(){ chooseA() {
this.SpecList.forEach((x,i)=>{ this.SpecList.forEach((x, i) => {
if(x.IScheck == true){ if (x.IScheck == true) {
this.tableData[this.outindex].NewSpecification = x.SpecificationName this.tableData[this.outindex].NewSpecification = x.SpecificationName
this.tableData[this.outindex].NewSpecificationSort = x.SpecificationKey this.tableData[this.outindex].NewSpecificationSort = x.SpecificationKey
} }
}) })
this.AtterDig = false this.AtterDig = false
}, },
//获取供应商 //获取供应商
getAllSupplier() { getAllSupplier() {
this.apipost("/api/Supplier/GetSupplierAllList", {}, res => { this.apipost("/api/Supplier/GetSupplierAllList", {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -538,8 +518,15 @@ ...@@ -538,8 +518,15 @@
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
.outboundManage .AttrList{
margin-top: 10px; position: relative; margin-right: 15px; .outboundManage .AttrList {
overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; margin-top: 10px;
position: relative;
margin-right: 15px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
cursor: pointer;
} }
</style> </style>
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 to comment