| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540 |
- /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId]) {
- /******/ return installedModules[moduleId].exports;
- /******/ }
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {}
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
- /******/ }
- /******/ };
- /******/
- /******/ // define __esModule on exports
- /******/ __webpack_require__.r = function(exports) {
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- /******/ }
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
- /******/ };
- /******/
- /******/ // create a fake namespace object
- /******/ // mode & 1: value is a module id, require it
- /******/ // mode & 2: merge all properties of value into the ns
- /******/ // mode & 4: return value when already ns object
- /******/ // mode & 8|1: behave like require
- /******/ __webpack_require__.t = function(value, mode) {
- /******/ if(mode & 1) value = __webpack_require__(value);
- /******/ if(mode & 8) return value;
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- /******/ var ns = Object.create(null);
- /******/ __webpack_require__.r(ns);
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- /******/ return ns;
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "/";
- /******/
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = 2);
- /******/ })
- /************************************************************************/
- /******/ ({
- /***/ "./resources/js/singles/rejectedIndex.js":
- /*!***********************************************!*\
- !*** ./resources/js/singles/rejectedIndex.js ***!
- \***********************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- var vueList = new Vue({
- el: "#list",
- data: {
- filterParams: {
- created_at: '',
- owner_id: '',
- order_number: '',
- logistic_number_return: '',
- mobile_sender: '',
- barcode_goods: '',
- is_checked: '',
- created_at_start: '',
- created_at_end: '',
- id_quality_label: '',
- is_loaded: '',
- checked_numbers: '',
- paginate: '50'
- },
- checkBoxAll: [],
- rejectedBills: rejectedBills,
- rejectedBills_checkBoxes: [],
- owners: owners,
- qualityLabels: qualityLabels
- },
- mounted: function mounted() {
- $(".tooltipTarget").tooltip({
- 'trigger': 'hover'
- });
- this.initInputs();
- $('#list').removeClass('d-none');
- },
- methods: {
- filterRun: function filterRun() {
- var form = $("<form method='get'></form>");
- this.filterParams['page'] = '';
- for (var key in this.filterParams) {
- if (this.filterParams[key]) {
- form.append($("<input type='hidden' name='" + key + "' value='" + this.filterParams[key] + "'>"));
- }
- }
- $("body").append(form);
- form.submit();
- },
- created_at_startChange: function created_at_startChange(e) {
- this.filterParams.created_at_start = e.target.value;
- this.filterRun();
- },
- created_at_endChange: function created_at_endChange(e) {
- this.filterParams.created_at_end = e.target.value;
- this.filterRun();
- },
- owner_idChange: function owner_idChange(e) {
- this.filterParams.owner_id = e.target.value;
- this.filterRun();
- },
- is_checkedChange: function is_checkedChange(e) {
- this.filterParams.is_checked = e.target.value;
- this.filterRun();
- },
- id_quality_labelChange: function id_quality_labelChange(e) {
- this.filterParams.id_quality_label = e.target.value;
- this.filterRun();
- },
- is_loadedChange: function is_loadedChange(e) {
- this.filterParams.is_loaded = e.target.value;
- this.filterRun();
- },
- mobile_senderChange: function mobile_senderChange(e) {
- this.filterParams.mobile_sender = e.target.value;
- this.filterRun();
- },
- checked_numbersChange: function checked_numbersChange(e) {
- this.filterParams.checked_numbers = e.target.value;
- this.filterRun();
- },
- initInputs: function initInputs() {
- var data = this; // let uriParts = decodeURI(location.href).split("?");
- // if(uriParts.length>1){
- // let params = uriParts[1].split('&');
- // params.forEach(function(paramPair){
- // let pair=paramPair.split('=');
- // let key = pair[0], val = pair[1];
- // $('input[name="'+key+'"]').val(val);
- // $('select[name="'+key+'"]').val(val);
- // data.filterParams[key]=val;
- // });
- // }
- for (var key in paginateParams) {
- var val = paginateParams[key];
- $('input[name="' + key + '"]').val(val);
- $('select[name="' + key + '"]').val(val);
- data.filterParams[key] = val;
- }
- },
- edit: function edit(e) {
- var id = $(e.target).parents('tr').attr('data-id');
- var editFullUri = editUrl + id + "/edit"; // location.href = editFullUri;
- var form = $('<form action=\"' + editFullUri + '\" method="post" target="_blank"></form>');
- form.append('<input type="hidden" name="filterParams" value=\'' + JSON.stringify(this.filterParams) + '\'/>');
- form.append(csrfInput);
- $('body').append(form);
- form.submit();
- },
- destroy: function destroy(rejectedBill) {
- if (!confirm('确定要删除退货信息“' + rejectedBill.owner.name + ':' + rejectedBill.logistic_number_return + '”吗?')) {
- return;
- }
- var data = this;
- var url = destroyUrl + rejectedBill.id;
- axios["delete"](url, {
- id: rejectedBill.id
- }).then(function (response) {
- if (response.data.success) {
- for (var i = 0; i < data.rejectedBills.length; i++) {
- if (data.rejectedBills[i].id === rejectedBill.id) {
- data.rejectedBills.splice(i, 1);
- break;
- }
- }
- tempTip.setDuration(1000);
- tempTip.showSuccess('删除退货信息"' + rejectedBill.owner.name + ':' + rejectedBill.logistic_number_return + '"成功!');
- } else {
- tempTip.setDuration(1000);
- tempTip.show('删除退货信息"' + rejectedBill.owner.name + ':' + rejectedBill.logistic_number_return + '"失败!');
- }
- })["catch"](function (err) {
- tempTip.setDuration(3000);
- tempTip.show('删除退货信息失败!' + '网络错误:' + err);
- console.log(err);
- });
- },
- created_at_startEntering: function created_at_startEntering(e) {
- if (e.key === 'Enter') {
- this.created_at_startChange(e);
- }
- },
- created_at_endEntering: function created_at_endEntering(e) {
- if (e.key === 'Enter') {
- this.created_at_endChange(e);
- }
- },
- owner_idEntering: function owner_idEntering(e) {
- if (e.key === 'Enter') {
- e.target.value = $('#owner_id').val();
- this.owner_idChange(e);
- e.target.value = '';
- }
- },
- locateOwner: function locateOwner(e) {
- str = e.target.value.trim();
- if (str === '') return;
- $("#owner_id option").attr("selected", false);
- var selectingOption = $("#owner_id").find("option:contains(" + str + ")").eq(0);
- selectingOption.attr("selected", true); // this.filterParams.owner_id=selectingOption.val();
- },
- order_numberEntering: function order_numberEntering(e) {
- if (e.key === 'Enter') {
- this.filterParams.order_number = e.target.value;
- this.filterRun();
- }
- },
- barcode_goodsEntering: function barcode_goodsEntering(e) {
- if (e.key === 'Enter') {
- this.filterParams.barcode_goods = e.target.value;
- this.filterRun();
- }
- },
- logistic_number_returnEntering: function logistic_number_returnEntering(e) {
- if (e.key === 'Enter') {
- this.filterParams.logistic_number_return = e.target.value;
- this.filterRun();
- }
- },
- logistic_numberEntering: function logistic_numberEntering(e) {
- if (e.key === 'Enter') {
- this.filterParams.logistic_number = e.target.value;
- this.filterRun();
- }
- },
- cancelCheckConfirmAll: function cancelCheckConfirmAll() {
- $('#checkConfirmingAll').tooltip('hide');
- setTimeout(function () {
- $(".tooltipTarget").tooltip({
- 'trigger': 'hover'
- });
- }, 10);
- this.checkBoxAll = false;
- this.rejectedBills.forEach(function (rejectedBill) {
- if (rejectedBill.is_checked === -1) rejectedBill.is_checked = '0';
- });
- },
- setIsLoaded_batch: function setIsLoaded_batch(e) {
- var _this = this;
- if (_this.rejectedBills_checkBoxes.length === 0) {
- tempTip.show('没有勾选记录');
- $(e.target).val("");
- return;
- }
- var val = $(e.target).val();
- var is_loaded = 0;
- var is_loadedLabel = '否';
- if (val === "1") {
- is_loaded = 1;
- is_loadedLabel = '是';
- } else if (val === "2") {
- is_loaded = 2;
- is_loadedLabel = '待推单';
- } else if (val === "null") {
- is_loaded = 'null';
- is_loadedLabel = '无需入库';
- }
- if (!confirm("确定要标记所有勾选入库情况为'" + is_loadedLabel + "'吗")) {
- return;
- }
- axios.post(ajaxCheckUrl, {
- ids: _this.rejectedBills_checkBoxes,
- is_loaded: is_loaded
- }).then(function (response) {
- if (response.data.success) {
- _this.rejectedBills_checkBoxes.forEach(function (id) {
- _this.rejectedBills.forEach(function (bill) {
- if (bill.id === id) {
- bill.is_loaded = is_loaded;
- }
- });
- });
- tempTip.setDuration(1000);
- tempTip.showSuccess('修改勾选记录的入库状态成功');
- } else {
- tempTip.setDuration(2500);
- tempTip.show('修改勾选记录的入库状态失败,错误:' + response.data.fail_info);
- }
- })["catch"](function (e) {
- alert('网络连接错误:' + e);
- tempTip.setDuration(2500);
- tempTip.show('审核勾选内容失败,网络连接错误:' + e);
- console.log(e);
- });
- $(e.target).val("");
- },
- checkBoxAllToggle: function checkBoxAllToggle(e) {
- var _this = this;
- if (_this.rejectedBills_checkBoxes.length >= this.rejectedBills.length) {
- _this.rejectedBills_checkBoxes = [];
- _this.checkBoxAll = [];
- } else {
- _this.rejectedBills_checkBoxes = [];
- this.rejectedBills.forEach(function (bill) {
- _this.rejectedBills_checkBoxes.push(bill.id);
- _this.checkBoxAll = [1];
- });
- }
- },
- checkAll: function checkAll() {
- var _this = this;
- if (_this.rejectedBills_checkBoxes.length === 0) {
- tempTip.show('没有勾选记录');
- return;
- }
- if (!confirm("确定要标记所有勾选内容为'已审核'吗")) {
- return;
- }
- axios.post(ajaxCheckAllURL, {
- ids: _this.rejectedBills_checkBoxes
- }).then(function (response) {
- if (response.data.success) {
- response.data.rejecteds.forEach(function (rejected) {
- _this.rejectedBills.forEach(function (rejectedBill) {
- if (parseInt(rejectedBill.id) === parseInt(rejected.id)) {
- rejectedBill.is_checked = 1;
- rejectedBill.checked_numbers = rejected.checked_numbers;
- }
- });
- });
- tempTip.setDuration(1000);
- tempTip.showSuccess('审核勾选内容成功');
- } else {
- tempTip.setDuration(2500);
- tempTip.show('审核勾选内容失败,错误:' + response.data.fail_info);
- }
- })["catch"](function (e) {
- alert('网络连接错误:' + e);
- tempTip.setDuration(2500);
- tempTip.show('审核勾选内容失败,网络连接错误:' + e);
- console.log(e);
- });
- },
- finishAll: function finishAll() {
- var _this = this;
- if (_this.rejectedBills_checkBoxes.length === 0) {
- tempTip.show('没有勾选记录');
- return;
- }
- if (!confirm("确定要标记所有勾选内容为'已完结'吗")) {
- return;
- }
- axios.post(ajaxFinishAllUrl, {
- ids: _this.rejectedBills_checkBoxes
- }).then(function (response) {
- if (response.data.success) {
- _this.rejectedBills.forEach(function (rejectedBill) {
- _this.rejectedBills_checkBoxes.forEach(function (checkedId) {
- if (rejectedBill.id === checkedId) {
- rejectedBill.is_finished = 1;
- }
- });
- });
- tempTip.setDuration(1000);
- tempTip.showSuccess('标记勾选内容为完结成功');
- } else {
- tempTip.setDuration(2500);
- tempTip.show('标记勾选内容为完结失败,错误:' + response.data.fail_info);
- }
- })["catch"](function (e) {
- alert('网络连接错误:' + e);
- tempTip.setDuration(2500);
- tempTip.show('标记勾选内容完结失败,网络连接错误:' + e);
- console.log(e);
- });
- },
- exportExcel: function exportExcel(e) {
- var _this = this;
- var val = $(e.target).val();
- $(e.target).val("");
- var form;
- if (val === "1") {
- if (_this.rejectedBills_checkBoxes.length === 0) {
- tempTip.show('没有勾选记录');
- return;
- }
- form = $('<form action=\"' + exportExcelURL + '\" method="post" target="_blank"></form>');
- form.append('<input type="hidden" name="ids" value=\'' + JSON.stringify(_this.rejectedBills_checkBoxes) + '\'/>');
- }
- if (val === "2") {
- if (!confirm("确定要导出当前条件下全部页的结果吗?")) {
- return;
- }
- if (total > 100000) {
- tempTip.okWindow('当前导出记录超过100000条,将不会导出已完结的记录', '知道了');
- }
- form = $('<form action=\"' + exportExcelOnFilterParamsURL + '\" method="post" target="_blank"></form>');
- form.append('<input type="hidden" name="filterParams" value=\'' + JSON.stringify(_this.filterParams) + '\'/>');
- }
- form.append(csrfInput);
- $('#list').append(form);
- form.submit();
- tempTip.setDuration(5000);
- tempTip.showSuccess("导出成功,如无结果则是被浏览器拦截新窗口,请尝试再次请求,或关闭浏览器对当前页面的弹出窗口拦截");
- },
- setPaginate: function setPaginate(e) {
- var _this = this; // let val=$(e.target).val();
- this.filterParams.paginate = e.target.value;
- this.filterRun();
- }
- },
- computed: {
- isBeingFilterConditions: function isBeingFilterConditions() {
- for (var key in this.filterParams) {
- if (this.filterParams[key]) {
- if (key === 'paginate') continue;
- if (key === 'page') continue;
- return true;
- }
- }
- return false;
- }
- },
- filters: {
- yesNo: function yesNo(val) {
- if (!val || val === 0 || val === '0') {
- return '否';
- }
- return '是';
- },
- yesNoIsLoaded: function yesNoIsLoaded(val) {
- switch (val) {
- case 0:
- case '0':
- return '否';
- case 1:
- case '1':
- return '是';
- case 2:
- case '2':
- return '待推单';
- case null:
- case 'null':
- return '无需入库';
- }
- return '';
- }
- }
- });
- /***/ }),
- /***/ 2:
- /*!*****************************************************!*\
- !*** multi ./resources/js/singles/rejectedIndex.js ***!
- \*****************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(/*! D:\Reald\desktop\BsWAS\src\resources\js\singles\rejectedIndex.js */"./resources/js/singles/rejectedIndex.js");
- /***/ })
- /******/ });
|