|
@@ -32,7 +32,15 @@
|
|
|
<span class="text-danger"> * </span>
|
|
<span class="text-danger"> * </span>
|
|
|
项目事件
|
|
项目事件
|
|
|
</label>
|
|
</label>
|
|
|
- <select id="projectItem" class="form-control" style="width: 156px" />
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-model:value="projectItemName"
|
|
|
|
|
+ style="width: 220px"
|
|
|
|
|
+ show-search
|
|
|
|
|
+ @change="projectHandleChange"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option v-for="item in projectList" :key="item.id" :value="item.name"> {{ item.name }}</a-select-option>
|
|
|
|
|
+ </a-select>
|
|
|
|
|
+ <!-- <select id="projectItem" class="form-control" style="width: 156px" /> -->
|
|
|
<button
|
|
<button
|
|
|
type="button"
|
|
type="button"
|
|
|
class="btn btn-info"
|
|
class="btn btn-info"
|
|
@@ -47,11 +55,26 @@
|
|
|
<span class="text-danger"> * </span>
|
|
<span class="text-danger"> * </span>
|
|
|
仓库
|
|
仓库
|
|
|
</label>
|
|
</label>
|
|
|
- <select id="warehouse" class="form-control" />
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-model:value="warehouseName"
|
|
|
|
|
+ style="width: 220px"
|
|
|
|
|
+ @change="storeHandleChange"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option v-for="item in warehouseList" :key="item.id" :value="item.name"> {{ item.name }}</a-select-option>
|
|
|
|
|
+ </a-select>
|
|
|
|
|
+ <!-- <select id="warehouse" class="form-control" /> -->
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="stockOutPrepateTemplate"> 需求模板 </label>
|
|
<label for="stockOutPrepateTemplate"> 需求模板 </label>
|
|
|
- <select id="stockOutPrepateTemplate" class="form-control" />
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-model:value="stockOutPrepateTemplateName"
|
|
|
|
|
+ style="width: 220px"
|
|
|
|
|
+ show-search
|
|
|
|
|
+ @change="templateHandleChange"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option v-for="item in stockOutPrepateTemplateList" :key="item.id" :value="item.name"> {{ item.name }}</a-select-option>
|
|
|
|
|
+ </a-select>
|
|
|
|
|
+ <!-- <select id="stockOutPrepateTemplate" class="form-control" /> -->
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label>物料编码</label>
|
|
<label>物料编码</label>
|
|
@@ -561,6 +584,9 @@ export default {
|
|
|
inventoryInstanceCurrentStocks: [],
|
|
inventoryInstanceCurrentStocks: [],
|
|
|
inventoryInstanceCurrentStocks2: [],
|
|
inventoryInstanceCurrentStocks2: [],
|
|
|
currentStock: [],
|
|
currentStock: [],
|
|
|
|
|
+ projectList:[],//项目事件数据
|
|
|
|
|
+ warehouseList:[],//仓库数据
|
|
|
|
|
+ stockOutPrepateTemplateList: [],
|
|
|
inventoryName: undefined,
|
|
inventoryName: undefined,
|
|
|
inventoryNo: undefined,
|
|
inventoryNo: undefined,
|
|
|
inventoryType: undefined,
|
|
inventoryType: undefined,
|
|
@@ -602,9 +628,9 @@ export default {
|
|
|
infoWindowNo1: 283548,
|
|
infoWindowNo1: 283548,
|
|
|
whereClauseSource: {
|
|
whereClauseSource: {
|
|
|
customerDataDimensions:[{
|
|
customerDataDimensions:[{
|
|
|
- fieldName: 'organization.id',
|
|
|
|
|
- dataDimensionTypeNo: '202201191700',
|
|
|
|
|
- defaultDataDimensionTypeValueNo: '1',
|
|
|
|
|
|
|
+ fieldName: 'client.id',
|
|
|
|
|
+ dataDimensionTypeNo: '202201191757',
|
|
|
|
|
+ defaultDataDimensionTypeValueNo: '4',
|
|
|
}],
|
|
}],
|
|
|
},
|
|
},
|
|
|
inventoryClassId: undefined,
|
|
inventoryClassId: undefined,
|
|
@@ -653,21 +679,21 @@ export default {
|
|
|
this.loadSelectWarehouse();
|
|
this.loadSelectWarehouse();
|
|
|
this.loadSelectTemplate();
|
|
this.loadSelectTemplate();
|
|
|
this.queryPickingCarCount();
|
|
this.queryPickingCarCount();
|
|
|
- if (this.warehouseId != null) {
|
|
|
|
|
- var warehouse = new Option(this.warehouseName, this.warehouseId);
|
|
|
|
|
- $('#warehouse').append(warehouse);
|
|
|
|
|
- }
|
|
|
|
|
- if (this.projectItemId != null) {
|
|
|
|
|
- var projectItem = new Option(this.projectItemName, this.projectItemId);
|
|
|
|
|
- $('#projectItem').append(projectItem);
|
|
|
|
|
- }
|
|
|
|
|
- if (this.stockOutPrepateTemplateId != null) {
|
|
|
|
|
- var stockOutPrepateTemplate = new Option(
|
|
|
|
|
- this.stockOutPrepateTemplateName,
|
|
|
|
|
- this.stockOutPrepateTemplateId,
|
|
|
|
|
- );
|
|
|
|
|
- $('#stockOutPrepateTemplate').append(stockOutPrepateTemplate);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (this.warehouseId != null) {
|
|
|
|
|
+ // var warehouse = new Option(this.warehouseName, this.warehouseId);
|
|
|
|
|
+ // $('#warehouse').append(warehouse);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (this.projectItemId != null) {
|
|
|
|
|
+ // var projectItem = new Option(this.projectItemName, this.projectItemId);
|
|
|
|
|
+ // $('#projectItem').append(projectItem);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (this.stockOutPrepateTemplateId != null) {
|
|
|
|
|
+ // var stockOutPrepateTemplate = new Option(
|
|
|
|
|
+ // this.stockOutPrepateTemplateName,
|
|
|
|
|
+ // this.stockOutPrepateTemplateId,
|
|
|
|
|
+ // );
|
|
|
|
|
+ // $('#stockOutPrepateTemplate').append(stockOutPrepateTemplate);
|
|
|
|
|
+ // }
|
|
|
if (this.warehouseId != null) {
|
|
if (this.warehouseId != null) {
|
|
|
this.getDatas();
|
|
this.getDatas();
|
|
|
}
|
|
}
|
|
@@ -684,6 +710,33 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+
|
|
|
|
|
+ // 项目事件
|
|
|
|
|
+ projectHandleChange:function (_,{key,value}) {
|
|
|
|
|
+ console.log(key,value);
|
|
|
|
|
+ this.projectItemId = key;
|
|
|
|
|
+ localStorage.setItem('projectItemId',key);
|
|
|
|
|
+ localStorage.setItem('projectItemName',value);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 仓库事件
|
|
|
|
|
+ storeHandleChange:function (_,{key,value}) {
|
|
|
|
|
+ this.warehouseId = key;
|
|
|
|
|
+ console.log(key,value);
|
|
|
|
|
+ localStorage.setItem('warehouseId',key);
|
|
|
|
|
+ localStorage.setItem('warehouseName',value);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ templateHandleChange: function(_,{key,value}) {
|
|
|
|
|
+ var _self = this;
|
|
|
|
|
+ this.stockOutPrepateTemplateId = key;
|
|
|
|
|
+ console.log(key,value);
|
|
|
|
|
+ localStorage.setItem('stockOutPrepateTemplateId',key);
|
|
|
|
|
+ localStorage.setItem('stockOutPrepateTemplateName',value);
|
|
|
|
|
+ //需求模板改变,设定页数充1开始
|
|
|
|
|
+ _self.pagination.current_page = 1;
|
|
|
|
|
+ _self.getDatas();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 选择工具箱内的工具加入领料车
|
|
* 选择工具箱内的工具加入领料车
|
|
|
* @author LeiGuoXian
|
|
* @author LeiGuoXian
|
|
@@ -1088,145 +1141,183 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
loadSelectProjectItem: function () {
|
|
loadSelectProjectItem: function () {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
- $('#projectItem')
|
|
|
|
|
- .select2({
|
|
|
|
|
- // 请求搜索框数据
|
|
|
|
|
- //data: _self.data,
|
|
|
|
|
- theme: 'bootstrap',
|
|
|
|
|
- placeholder: '项目事件',
|
|
|
|
|
- minimumInputLength: 0,
|
|
|
|
|
- placeholderOption: 'first',
|
|
|
|
|
- quietMillis: 250,
|
|
|
|
|
- allowClear: true,
|
|
|
|
|
- language: 'zh-CN',
|
|
|
|
|
- width: 'resolve',
|
|
|
|
|
- // 请求搜索框数据
|
|
|
|
|
- ajax: {
|
|
|
|
|
- url: function (params) {
|
|
|
|
|
- return Common.getApiURL('ProjectItemResource/queryByCondition');
|
|
|
|
|
- },
|
|
|
|
|
- dataType: 'json',
|
|
|
|
|
- type: 'get',
|
|
|
|
|
- delay: 250,
|
|
|
|
|
- minimumInputLength: 0,
|
|
|
|
|
- transport: function (params, success, failure) {
|
|
|
|
|
- params.beforeSend = Common.addTokenToRequest;
|
|
|
|
|
- var $request = $.ajax(params);
|
|
|
|
|
- $request.then(success);
|
|
|
|
|
- $request.fail(failure);
|
|
|
|
|
- return $request;
|
|
|
|
|
- },
|
|
|
|
|
- data: function (params) {
|
|
|
|
|
- return {
|
|
|
|
|
- name: params.term,
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- processResults: function (data, params) {
|
|
|
|
|
- if(data.errorCode == 0) {
|
|
|
|
|
- var more = params * 10 <= data.datas.length;
|
|
|
|
|
- for (var i = 0; i < data.datas.length; i++) {
|
|
|
|
|
- data.datas[i].text = data.datas[i].name;
|
|
|
|
|
- }
|
|
|
|
|
- _self.projectItems = data.datas;
|
|
|
|
|
- return {
|
|
|
|
|
- results: data.datas,
|
|
|
|
|
- more: more,
|
|
|
|
|
- };
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
- .on('change', function () {
|
|
|
|
|
- if ($(this).val() == null) {
|
|
|
|
|
- _self.projectItemId = null;
|
|
|
|
|
- var storage = window.localStorage;
|
|
|
|
|
- storage.setItem('projectItemId', _self.projectItemId);
|
|
|
|
|
- _self.projectItemName = '';
|
|
|
|
|
- storage.setItem('projectItemName', _self.projectItemName);
|
|
|
|
|
- } else {
|
|
|
|
|
- _self.projectItemId = $(this).val();
|
|
|
|
|
- for (var i = 0; i < _self.projectItems.length; i++) {
|
|
|
|
|
- if (_self.projectItems[i].id == _self.projectItemId) {
|
|
|
|
|
- _self.projectItemName = _self.projectItems[i].name;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- storage.setItem('projectItemId', _self.projectItemId);
|
|
|
|
|
- storage.setItem('projectItemName', _self.projectItemName);
|
|
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ type: 'get',
|
|
|
|
|
+ dataType: 'json',
|
|
|
|
|
+ url: Common.getApiURL('ProjectItemResource/queryByCondition'),
|
|
|
|
|
+ contentType: 'application/json',
|
|
|
|
|
+ beforeSend: function (request) {
|
|
|
|
|
+ Common.addTokenToRequest(request);
|
|
|
|
|
+ },
|
|
|
|
|
+ success: function ({datas,errorCode,errorMessage}) {
|
|
|
|
|
+ if (errorCode == 0) {
|
|
|
|
|
+ _self.projectList = datas;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ alert(errorMessage);
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
|
|
+ Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ // $('#projectItem')
|
|
|
|
|
+ // .select2({
|
|
|
|
|
+ // // 请求搜索框数据
|
|
|
|
|
+ // //data: _self.data,
|
|
|
|
|
+ // theme: 'bootstrap',
|
|
|
|
|
+ // placeholder: '项目事件',
|
|
|
|
|
+ // minimumInputLength: 0,
|
|
|
|
|
+ // placeholderOption: 'first',
|
|
|
|
|
+ // quietMillis: 250,
|
|
|
|
|
+ // allowClear: true,
|
|
|
|
|
+ // language: 'zh-CN',
|
|
|
|
|
+ // width: 'resolve',
|
|
|
|
|
+ // // 请求搜索框数据
|
|
|
|
|
+ // ajax: {
|
|
|
|
|
+ // url: function (params) {
|
|
|
|
|
+ // return Common.getApiURL('ProjectItemResource/queryByCondition');
|
|
|
|
|
+ // },
|
|
|
|
|
+ // dataType: 'json',
|
|
|
|
|
+ // type: 'get',
|
|
|
|
|
+ // delay: 250,
|
|
|
|
|
+ // minimumInputLength: 0,
|
|
|
|
|
+ // transport: function (params, success, failure) {
|
|
|
|
|
+ // params.beforeSend = Common.addTokenToRequest;
|
|
|
|
|
+ // var $request = $.ajax(params);
|
|
|
|
|
+ // $request.then(success);
|
|
|
|
|
+ // $request.fail(failure);
|
|
|
|
|
+ // return $request;
|
|
|
|
|
+ // },
|
|
|
|
|
+ // data: function (params) {
|
|
|
|
|
+ // return {
|
|
|
|
|
+ // name: params.term,
|
|
|
|
|
+ // };
|
|
|
|
|
+ // },
|
|
|
|
|
+ // processResults: function (data, params) {
|
|
|
|
|
+ // if(data.errorCode == 0) {
|
|
|
|
|
+ // var more = params * 10 <= data.datas.length;
|
|
|
|
|
+ // for (var i = 0; i < data.datas.length; i++) {
|
|
|
|
|
+ // data.datas[i].text = data.datas[i].name;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // _self.projectItems = data.datas;
|
|
|
|
|
+ // return {
|
|
|
|
|
+ // results: data.datas,
|
|
|
|
|
+ // more: more,
|
|
|
|
|
+ // };
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ // },
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .on('change', function () {
|
|
|
|
|
+ // if ($(this).val() == null) {
|
|
|
|
|
+ // _self.projectItemId = null;
|
|
|
|
|
+ // var storage = window.localStorage;
|
|
|
|
|
+ // storage.setItem('projectItemId', _self.projectItemId);
|
|
|
|
|
+ // _self.projectItemName = '';
|
|
|
|
|
+ // storage.setItem('projectItemName', _self.projectItemName);
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // _self.projectItemId = $(this).val();
|
|
|
|
|
+ // for (var i = 0; i < _self.projectItems.length; i++) {
|
|
|
|
|
+ // if (_self.projectItems[i].id == _self.projectItemId) {
|
|
|
|
|
+ // _self.projectItemName = _self.projectItems[i].name;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // storage.setItem('projectItemId', _self.projectItemId);
|
|
|
|
|
+ // storage.setItem('projectItemName', _self.projectItemName);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 仓库
|
|
* 仓库
|
|
|
*/
|
|
*/
|
|
|
loadSelectWarehouse: function () {
|
|
loadSelectWarehouse: function () {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
- $('#warehouse')
|
|
|
|
|
- .select2({
|
|
|
|
|
- // 请求搜索框数据
|
|
|
|
|
- theme: 'bootstrap',
|
|
|
|
|
- data: _self.data,
|
|
|
|
|
- placeholder: '仓库',
|
|
|
|
|
- minimumInputLength: 0,
|
|
|
|
|
- placeholderOption: 'first',
|
|
|
|
|
- quietMillis: 250,
|
|
|
|
|
- allowClear: true,
|
|
|
|
|
- language: 'zh-CN',
|
|
|
|
|
- width: 'resolve',
|
|
|
|
|
- // 请求搜索框数据
|
|
|
|
|
- ajax: {
|
|
|
|
|
- url: function (params) {
|
|
|
|
|
- return Common.getApiURL('WarehouseResource/queryByCondition');
|
|
|
|
|
- },
|
|
|
|
|
- dataType: 'json',
|
|
|
|
|
- type: 'get',
|
|
|
|
|
- delay: 250,
|
|
|
|
|
- minimumInputLength: 0,
|
|
|
|
|
- transport: function (params, success, failure) {
|
|
|
|
|
- params.beforeSend = Common.addTokenToRequest;
|
|
|
|
|
- var $request = $.ajax(params);
|
|
|
|
|
- $request.then(success);
|
|
|
|
|
- $request.fail(failure);
|
|
|
|
|
- return $request;
|
|
|
|
|
- },
|
|
|
|
|
- data: function (params) {
|
|
|
|
|
- return {
|
|
|
|
|
- name: params.term,
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- processResults: function (data, params) {
|
|
|
|
|
- if(data.errorCode == 0) {
|
|
|
|
|
- var more = params * 10 <= data.datas.length;
|
|
|
|
|
- for (var i = 0; i < data.datas.length; i++) {
|
|
|
|
|
- data.datas[i].text = data.datas[i].name;
|
|
|
|
|
- }
|
|
|
|
|
- _self.warehouses = data.datas;
|
|
|
|
|
- return {
|
|
|
|
|
- results: data.datas,
|
|
|
|
|
- more: more,
|
|
|
|
|
- };
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
- .on('change', function () {
|
|
|
|
|
- if ($(this).val() == null) {
|
|
|
|
|
- _self.warehouseId = null;
|
|
|
|
|
- _self.warehouseName = '';
|
|
|
|
|
- var storage = window.localStorage;
|
|
|
|
|
- storage.setItem('warehouseId', _self.warehouseId);
|
|
|
|
|
- storage.setItem('warehouseName', _self.warehouseName);
|
|
|
|
|
- } else {
|
|
|
|
|
- _self.warehouseId = $(this).val();
|
|
|
|
|
- for (var i = 0; i < _self.warehouses.length; i++) {
|
|
|
|
|
- if (_self.warehouses[i].id == _self.warehouseId) {
|
|
|
|
|
- _self.warehouseName = _self.warehouses[i].name;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- storage.setItem('warehouseId', _self.warehouseId);
|
|
|
|
|
- storage.setItem('warehouseName', _self.warehouseName);
|
|
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ type: 'get',
|
|
|
|
|
+ dataType: 'json',
|
|
|
|
|
+ url: Common.getApiURL('WarehouseResource/queryByCondition'),
|
|
|
|
|
+ contentType: 'application/json',
|
|
|
|
|
+ beforeSend: function (request) {
|
|
|
|
|
+ Common.addTokenToRequest(request);
|
|
|
|
|
+ },
|
|
|
|
|
+ success: function ({datas,errorCode,errorMessage}) {
|
|
|
|
|
+ if (errorCode == 0) {
|
|
|
|
|
+ _self.warehouseList = datas;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ alert(errorMessage);
|
|
|
}
|
|
}
|
|
|
- _self.getDatas();
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
|
|
+ Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ // $('#warehouse')
|
|
|
|
|
+ // .select2({
|
|
|
|
|
+ // // 请求搜索框数据
|
|
|
|
|
+ // theme: 'bootstrap',
|
|
|
|
|
+ // data: _self.data,
|
|
|
|
|
+ // placeholder: '仓库',
|
|
|
|
|
+ // minimumInputLength: 0,
|
|
|
|
|
+ // placeholderOption: 'first',
|
|
|
|
|
+ // quietMillis: 250,
|
|
|
|
|
+ // allowClear: true,
|
|
|
|
|
+ // language: 'zh-CN',
|
|
|
|
|
+ // width: 'resolve',
|
|
|
|
|
+ // // 请求搜索框数据
|
|
|
|
|
+ // ajax: {
|
|
|
|
|
+ // url: function (params) {
|
|
|
|
|
+ // return Common.getApiURL('WarehouseResource/queryByCondition');
|
|
|
|
|
+ // },
|
|
|
|
|
+ // dataType: 'json',
|
|
|
|
|
+ // type: 'get',
|
|
|
|
|
+ // delay: 250,
|
|
|
|
|
+ // minimumInputLength: 0,
|
|
|
|
|
+ // transport: function (params, success, failure) {
|
|
|
|
|
+ // params.beforeSend = Common.addTokenToRequest;
|
|
|
|
|
+ // var $request = $.ajax(params);
|
|
|
|
|
+ // $request.then(success);
|
|
|
|
|
+ // $request.fail(failure);
|
|
|
|
|
+ // return $request;
|
|
|
|
|
+ // },
|
|
|
|
|
+ // data: function (params) {
|
|
|
|
|
+ // return {
|
|
|
|
|
+ // name: params.term,
|
|
|
|
|
+ // };
|
|
|
|
|
+ // },
|
|
|
|
|
+ // processResults: function (data, params) {
|
|
|
|
|
+ // if(data.errorCode == 0) {
|
|
|
|
|
+ // var more = params * 10 <= data.datas.length;
|
|
|
|
|
+ // for (var i = 0; i < data.datas.length; i++) {
|
|
|
|
|
+ // data.datas[i].text = data.datas[i].name;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // _self.warehouses = data.datas;
|
|
|
|
|
+ // return {
|
|
|
|
|
+ // results: data.datas,
|
|
|
|
|
+ // more: more,
|
|
|
|
|
+ // };
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ // },
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .on('change', function () {
|
|
|
|
|
+ // if ($(this).val() == null) {
|
|
|
|
|
+ // _self.warehouseId = null;
|
|
|
|
|
+ // _self.warehouseName = '';
|
|
|
|
|
+ // var storage = window.localStorage;
|
|
|
|
|
+ // storage.setItem('warehouseId', _self.warehouseId);
|
|
|
|
|
+ // storage.setItem('warehouseName', _self.warehouseName);
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // _self.warehouseId = $(this).val();
|
|
|
|
|
+ // for (var i = 0; i < _self.warehouses.length; i++) {
|
|
|
|
|
+ // if (_self.warehouses[i].id == _self.warehouseId) {
|
|
|
|
|
+ // _self.warehouseName = _self.warehouses[i].name;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // storage.setItem('warehouseId', _self.warehouseId);
|
|
|
|
|
+ // storage.setItem('warehouseName', _self.warehouseName);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // _self.getDatas();
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1234,86 +1325,105 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
loadSelectTemplate: function () {
|
|
loadSelectTemplate: function () {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
- $('#stockOutPrepateTemplate')
|
|
|
|
|
- .select2({
|
|
|
|
|
- // 请求搜索框数据
|
|
|
|
|
- //data: _self.data,
|
|
|
|
|
- theme: 'bootstrap',
|
|
|
|
|
- placeholder: '需求模板',
|
|
|
|
|
- minimumInputLength: 0,
|
|
|
|
|
- placeholderOption: 'first',
|
|
|
|
|
- quietMillis: 250,
|
|
|
|
|
- allowClear: true,
|
|
|
|
|
- language: 'zh-CN',
|
|
|
|
|
- width: 'resolve',
|
|
|
|
|
- // 请求搜索框数据
|
|
|
|
|
- ajax: {
|
|
|
|
|
- url: function (params) {
|
|
|
|
|
- return Common.getApiURL('StockOutPrepateTemplateResource/queryByCondition');
|
|
|
|
|
- },
|
|
|
|
|
- dataType: 'json',
|
|
|
|
|
- type: 'get',
|
|
|
|
|
- delay: 250,
|
|
|
|
|
- minimumInputLength: 0,
|
|
|
|
|
- transport: function (params, success, failure) {
|
|
|
|
|
- params.beforeSend = Common.addTokenToRequest;
|
|
|
|
|
- var $request = $.ajax(params);
|
|
|
|
|
- $request.then(success);
|
|
|
|
|
- $request.fail(failure);
|
|
|
|
|
- return $request;
|
|
|
|
|
- },
|
|
|
|
|
- data: function (params) {
|
|
|
|
|
- return {
|
|
|
|
|
- name: params.term,
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- processResults: function (data, params) {
|
|
|
|
|
- console.log(data.datas);
|
|
|
|
|
- if(data.errorCode == 0) {
|
|
|
|
|
- var more = params * 10 <= data.datas.length;
|
|
|
|
|
- for (var i = 0; i < data.datas.length; i++) {
|
|
|
|
|
- data.datas[i].text = data.datas[i].name;
|
|
|
|
|
- }
|
|
|
|
|
- _self.stockOutPrepateTemplateNames = data.datas;
|
|
|
|
|
- return {
|
|
|
|
|
- results: data.datas,
|
|
|
|
|
- more: more,
|
|
|
|
|
- };
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
- .on('change', function () {
|
|
|
|
|
- if ($(this).val() == null) {
|
|
|
|
|
- _self.stockOutPrepateTemplateId = null;
|
|
|
|
|
- var storage = window.localStorage;
|
|
|
|
|
- _self.stockOutPrepateTemplateName = '';
|
|
|
|
|
- storage.setItem('stockOutPrepateTemplateId', _self.stockOutPrepateTemplateId);
|
|
|
|
|
- storage.setItem(
|
|
|
|
|
- 'stockOutPrepateTemplateName',
|
|
|
|
|
- _self.stockOutPrepateTemplateName,
|
|
|
|
|
- );
|
|
|
|
|
- } else {
|
|
|
|
|
- _self.stockOutPrepateTemplateId = $(this).val();
|
|
|
|
|
- for (var i = 0; i < _self.stockOutPrepateTemplateNames.length; i++) {
|
|
|
|
|
- if (
|
|
|
|
|
- _self.stockOutPrepateTemplateNames[i].id ==
|
|
|
|
|
- _self.stockOutPrepateTemplateId
|
|
|
|
|
- ) {
|
|
|
|
|
- _self.stockOutPrepateTemplateName =
|
|
|
|
|
- _self.stockOutPrepateTemplateNames[i].name;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- storage.setItem('stockOutPrepateTemplateId', _self.stockOutPrepateTemplateId);
|
|
|
|
|
- storage.setItem(
|
|
|
|
|
- 'stockOutPrepateTemplateName',
|
|
|
|
|
- _self.stockOutPrepateTemplateName,
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ type: 'get',
|
|
|
|
|
+ dataType: 'json',
|
|
|
|
|
+ url: Common.getApiURL('StockOutPrepateTemplateResource/queryByCondition'),
|
|
|
|
|
+ contentType: 'application/json',
|
|
|
|
|
+ beforeSend: function (request) {
|
|
|
|
|
+ Common.addTokenToRequest(request);
|
|
|
|
|
+ },
|
|
|
|
|
+ success: function ({datas,errorCode,errorMessage}) {
|
|
|
|
|
+ if (errorCode == 0) {
|
|
|
|
|
+ _self.stockOutPrepateTemplateList = datas;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ alert(errorMessage);
|
|
|
}
|
|
}
|
|
|
- //需求模板改变,设定页数充1开始
|
|
|
|
|
- _self.pagination.current_page = 1;
|
|
|
|
|
- _self.getDatas();
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
|
|
+ Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ // $('#stockOutPrepateTemplate')
|
|
|
|
|
+ // .select2({
|
|
|
|
|
+ // // 请求搜索框数据
|
|
|
|
|
+ // //data: _self.data,
|
|
|
|
|
+ // theme: 'bootstrap',
|
|
|
|
|
+ // placeholder: '需求模板',
|
|
|
|
|
+ // minimumInputLength: 0,
|
|
|
|
|
+ // placeholderOption: 'first',
|
|
|
|
|
+ // quietMillis: 250,
|
|
|
|
|
+ // allowClear: true,
|
|
|
|
|
+ // language: 'zh-CN',
|
|
|
|
|
+ // width: 'resolve',
|
|
|
|
|
+ // // 请求搜索框数据
|
|
|
|
|
+ // ajax: {
|
|
|
|
|
+ // url: function (params) {
|
|
|
|
|
+ // return Common.getApiURL('StockOutPrepateTemplateResource/queryByCondition');
|
|
|
|
|
+ // },
|
|
|
|
|
+ // dataType: 'json',
|
|
|
|
|
+ // type: 'get',
|
|
|
|
|
+ // delay: 250,
|
|
|
|
|
+ // minimumInputLength: 0,
|
|
|
|
|
+ // transport: function (params, success, failure) {
|
|
|
|
|
+ // params.beforeSend = Common.addTokenToRequest;
|
|
|
|
|
+ // var $request = $.ajax(params);
|
|
|
|
|
+ // $request.then(success);
|
|
|
|
|
+ // $request.fail(failure);
|
|
|
|
|
+ // return $request;
|
|
|
|
|
+ // },
|
|
|
|
|
+ // data: function (params) {
|
|
|
|
|
+ // return {
|
|
|
|
|
+ // name: params.term,
|
|
|
|
|
+ // };
|
|
|
|
|
+ // },
|
|
|
|
|
+ // processResults: function (data, params) {
|
|
|
|
|
+ // console.log(data.datas);
|
|
|
|
|
+ // if(data.errorCode == 0) {
|
|
|
|
|
+ // var more = params * 10 <= data.datas.length;
|
|
|
|
|
+ // for (var i = 0; i < data.datas.length; i++) {
|
|
|
|
|
+ // data.datas[i].text = data.datas[i].name;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // _self.stockOutPrepateTemplateNames = data.datas;
|
|
|
|
|
+ // return {
|
|
|
|
|
+ // results: data.datas,
|
|
|
|
|
+ // more: more,
|
|
|
|
|
+ // };
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ // },
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .on('change', function () {
|
|
|
|
|
+ // if ($(this).val() == null) {
|
|
|
|
|
+ // _self.stockOutPrepateTemplateId = null;
|
|
|
|
|
+ // var storage = window.localStorage;
|
|
|
|
|
+ // _self.stockOutPrepateTemplateName = '';
|
|
|
|
|
+ // storage.setItem('stockOutPrepateTemplateId', _self.stockOutPrepateTemplateId);
|
|
|
|
|
+ // storage.setItem(
|
|
|
|
|
+ // 'stockOutPrepateTemplateName',
|
|
|
|
|
+ // _self.stockOutPrepateTemplateName,
|
|
|
|
|
+ // );
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // _self.stockOutPrepateTemplateId = $(this).val();
|
|
|
|
|
+ // for (var i = 0; i < _self.stockOutPrepateTemplateNames.length; i++) {
|
|
|
|
|
+ // if (
|
|
|
|
|
+ // _self.stockOutPrepateTemplateNames[i].id ==
|
|
|
|
|
+ // _self.stockOutPrepateTemplateId
|
|
|
|
|
+ // ) {
|
|
|
|
|
+ // _self.stockOutPrepateTemplateName =
|
|
|
|
|
+ // _self.stockOutPrepateTemplateNames[i].name;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // storage.setItem('stockOutPrepateTemplateId', _self.stockOutPrepateTemplateId);
|
|
|
|
|
+ // storage.setItem(
|
|
|
|
|
+ // 'stockOutPrepateTemplateName',
|
|
|
|
|
+ // _self.stockOutPrepateTemplateName,
|
|
|
|
|
+ // );
|
|
|
|
|
+ // }
|
|
|
|
|
+ // //需求模板改变,设定页数充1开始
|
|
|
|
|
+ // _self.pagination.current_page = 1;
|
|
|
|
|
+ // _self.getDatas();
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
//查询仓库物料信息
|
|
//查询仓库物料信息
|
|
|
getDatas: function () {
|
|
getDatas: function () {
|
|
@@ -1653,7 +1763,7 @@ export default {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
PickingCarResource.queryPickingCarCount().then(
|
|
PickingCarResource.queryPickingCarCount().then(
|
|
|
successData => {
|
|
successData => {
|
|
|
- if(successData.errorCdoe == 0) {
|
|
|
|
|
|
|
+ if(successData.errorCode == 0) {
|
|
|
_self.count = successData.data;
|
|
_self.count = successData.data;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|