| 1 |
- {"code":"/*!\n * build: vue-admin-beautiful \n * copyright: chuzhixin 1204505056@qq.com \n * time: 2022-12-12 09:51:32\n */\n(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-8665cc0c\"],{\"1ccb\":function(t,e,o){\"use strict\";o(\"8d2f\")},\"2d73\":function(t,e,o){},\"478b\":function(t,e,o){\"use strict\";o.r(e),o.d(e,\"getWarehouseInfo\",(function(){return r})),o.d(e,\"getAllWarehouse\",(function(){return a})),o.d(e,\"enableWarehouse\",(function(){return c})),o.d(e,\"updateWarehouse\",(function(){return s})),o.d(e,\"deleteWarehouse\",(function(){return i})),o.d(e,\"addWarehouse\",(function(){return l})),o.d(e,\"addWarehouseBeginning\",(function(){return u})),o.d(e,\"stockaddLogistics\",(function(){return d})),o.d(e,\"getAllSaleOut\",(function(){return h})),o.d(e,\"exportGetAllSaleOut\",(function(){return p})),o.d(e,\"getSaleOutInfo\",(function(){return f})),o.d(e,\"getSaleOutInfoT\",(function(){return m})),o.d(e,\"searchAllSaleOut\",(function(){return k})),o.d(e,\"updateSaleOutStatus\",(function(){return g})),o.d(e,\"saveOutInventory\",(function(){return _})),o.d(e,\"statisticsAllSaleOut\",(function(){return b})),o.d(e,\"rejectInventory\",(function(){return I})),o.d(e,\"deleteDetailByInventoryInId\",(function(){return S})),o.d(e,\"searchAllPurchaseIn\",(function(){return y})),o.d(e,\"getPurchaseInInfo\",(function(){return v})),o.d(e,\"getPurchaseInInfoT\",(function(){return O})),o.d(e,\"getAllPurchaseIn\",(function(){return A})),o.d(e,\"exportsGetAllPurchaseIn\",(function(){return j})),o.d(e,\"updatePurchaseInStatus\",(function(){return w})),o.d(e,\"statisticsAllPurchaseIn\",(function(){return G})),o.d(e,\"getInventoryAll\",(function(){return x})),o.d(e,\"exportGetInventoryAll\",(function(){return D})),o.d(e,\"getInventoryDetailsAll\",(function(){return C})),o.d(e,\"exportGetInventoryDetailsAll\",(function(){return N})),o.d(e,\"searchAllInventoryDetails\",(function(){return L})),o.d(e,\"exportSearchAllInventoryDetails\",(function(){return P})),o.d(e,\"getAllBatch\",(function(){return R})),o.d(e,\"searchAllInventoryBatch\",(function(){return $})),o.d(e,\"getStocktakingInfo\",(function(){return W})),o.d(e,\"updateStocktaking\",(function(){return B})),o.d(e,\"auditStocktaking\",(function(){return M})),o.d(e,\"getAllStocktaking\",(function(){return z})),o.d(e,\"exportGetAllStocktaking\",(function(){return T})),o.d(e,\"searchAllStocktaking\",(function(){return E})),o.d(e,\"exportSearchAllStocktaking\",(function(){return V})),o.d(e,\"addStocktaking\",(function(){return q})),o.d(e,\"inventoryStatistics\",(function(){return J})),o.d(e,\"exportsInventoryStatistics\",(function(){return U})),o.d(e,\"searchInventoryStatistics\",(function(){return F})),o.d(e,\"StockGetAllPurchase\",(function(){return H})),o.d(e,\"PurchaseInGetAllPurchaseOut\",(function(){return K})),o.d(e,\"getWarehouseInventory\",(function(){return Q})),o.d(e,\"addAllocate\",(function(){return X})),o.d(e,\"getInventoryByWarehouseId\",(function(){return Y})),o.d(e,\"getAllAllocate\",(function(){return Z})),o.d(e,\"deleteAllocate\",(function(){return tt})),o.d(e,\"getAllocateInfo\",(function(){return et})),o.d(e,\"updateAllocate\",(function(){return ot})),o.d(e,\"auditAllocate\",(function(){return nt})),o.d(e,\"searchAllocate\",(function(){return rt})),o.d(e,\"getBatchByIds\",(function(){return at})),o.d(e,\"getSkuNum\",(function(){return ct})),o.d(e,\"getMasterSkuNum\",(function(){return st})),o.d(e,\"addReservoir\",(function(){return it})),o.d(e,\"getReservoirInfo\",(function(){return lt})),o.d(e,\"getAllReservoir\",(function(){return ut})),o.d(e,\"getListReservoir\",(function(){return dt})),o.d(e,\"enableReservoir\",(function(){return ht})),o.d(e,\"updateReservoir\",(function(){return pt})),o.d(e,\"deleteReservoir\",(function(){return ft})),o.d(e,\"getAllStorageLocation\",(function(){return mt})),o.d(e,\"addStorageLocation\",(function(){return kt})),o.d(e,\"getStorageLocationInfo\",(function(){return gt})),o.d(e,\"enableStorageLocation\",(function(){return _t})),o.d(e,\"updateStorageLocation\",(function(){return bt})),o.d(e,\"getAreaDateBySkuId\",(function(){return It})),o.d(e,\"addReportLoss\",(function(){return St})),o.d(e,\"getAllReportLoss\",(function(){return yt})),o.d(e,\"getReportLossInfo\",(function(){return vt})),o.d(e,\"auditReportLoss\",(function(){return Ot})),o.d(e,\"deleteReportLoss\",(function(){return At})),o.d(e,\"countPurchaseCost\",(function(){return jt})),o.d(e,\"exportgetInventoryByWarehouseId\",(function(){return wt})),o.d(e,\"exportgetAllAllocate\",(function(){return Gt})),o.d(e,\"getPickingInfo\",(function(){return xt})),o.d(e,\"addPicking\",(function(){return Dt})),o.d(e,\"getAllPicking\",(function(){return Ct})),o.d(e,\"getAllPickingGoodsDetail\",(function(){return Nt}));var n=o(\"b775\");function r(t,e){return Object(n[\"default\"])({url:\"/Stock/Warehouse/getWarehouseInfo/\"+t,method:\"get\",data:e})}function a(t){return Object(n[\"default\"])({url:\"/Stock/Warehouse/getAllWarehouse\",method:\"post\",data:t})}function c(t){return Object(n[\"default\"])({url:\"/Stock/Warehouse/enableWarehouse\",method:\"post\",data:t})}function s(t,e){return Object(n[\"default\"])({url:\"/Stock/Warehouse/updateWarehouse/\"+t,method:\"put\",data:e})}function i(t,e){return Object(n[\"default\"])({url:\"/Stock/Warehouse/deleteWarehouse/\"+t,method:\"delete\",data:e})}function l(t){return Object(n[\"default\"])({url:\"/Stock/Warehouse/addWarehouse\",method:\"post\",data:t})}function u(t){return Object(n[\"default\"])({url:\"/Stock/Warehouse/addWarehouseBeginning\",method:\"post\",data:t})}function d(t){return Object(n[\"default\"])({url:\"/Stock/InventoryOut/addLogistics\",method:\"post\",data:t})}function h(t){return Object(n[\"default\"])({url:\"/Stock/InventoryOut/getAllInventoryOut\",method:\"post\",data:t})}function p(t){return Object(n[\"default\"])({url:\"/Stock/InventoryOut/getAllInventoryOut\",method:\"post\",responseType:\"blob\",data:t})}function f(t,e){return Object(n[\"default\"])({url:\"/Stock/InventoryOut/getInventoryOutInfo/\"+t,method:\"get\",data:e})}function m(t){return Object(n[\"default\"])({url:\"/Stock/InventoryOut/getInventoryOutInfo\",method:\"post\",data:t})}function k(t){return Object(n[\"default\"])({url:\"/Stock/InventoryOut/searchAllInventoryOut\",method:\"post\",data:t})}function g(t){return Object(n[\"default\"])({url:\"/Stock/InventoryOut/updateInventoryOutStatus\",method:\"post\",data:t})}function _(t,e){return Object(n[\"default\"])({url:\"/Stock/InventoryOut/saveOutInventory/\"+t,method:\"put\",data:e})}function b(t){return Object(n[\"default\"])({url:\"/Stock/InventoryOut/statisticsAllInventoryOut\",method:\"post\",data:t})}function I(t){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/rejectInventory\",method:\"post\",data:t})}function S(t){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/deleteDetailByInventoryInId\",method:\"post\",data:t})}function y(t){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/searchAllInventoryIn\",method:\"post\",data:t})}function v(t,e){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/getInventoryInInfo/\"+t,method:\"put\",data:e})}function O(t){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/getInventoryInInfo\",method:\"put\",data:t})}function A(t){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/getAllInventoryIn\",method:\"post\",data:t})}function j(t){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/getAllInventoryIn\",method:\"post\",responseType:\"blob\",data:t})}function w(t){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/updateInventoryInStatus\",method:\"post\",data:t})}function G(t){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/statisticsAllInventoryIn\",method:\"post\",data:t})}function x(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/getInventoryAll\",method:\"post\",data:t})}function D(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/getInventoryAll\",responseType:\"blob\",method:\"post\",data:t})}function C(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/getInventoryDetailsAll\",method:\"post\",data:t})}function N(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/getInventoryDetailsAll\",responseType:\"blob\",method:\"post\",data:t})}function L(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/searchAllInventoryDetails\",method:\"post\",data:t})}function P(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/searchAllInventoryDetails\",responseType:\"blob\",method:\"post\",data:t})}function R(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/getAllBatch\",method:\"post\",data:t})}function $(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/searchAllInventoryBatch\",method:\"post\",data:t})}function W(t,e){return Object(n[\"default\"])({url:\"/Stock/Stocktaking/getStocktakingInfo/\"+t,method:\"get\",data:e})}function B(t,e){return Object(n[\"default\"])({url:\"/Stock/Stocktaking/updateStocktaking/\"+t,method:\"put\",data:e})}function M(t,e){return Object(n[\"default\"])({url:\"/Stock/Stocktaking/auditStocktaking/\"+t,method:\"put\",data:e})}function z(t){return Object(n[\"default\"])({url:\"/Stock/Stocktaking/getAllStocktaking\",method:\"post\",data:t})}function T(t){return Object(n[\"default\"])({url:\"/Stock/Stocktaking/getAllStocktaking\",responseType:\"blob\",method:\"post\",data:t})}function E(t){return Object(n[\"default\"])({url:\"/Stock/Stocktaking/searchAllStocktaking\",method:\"post\",data:t})}function V(t){return Object(n[\"default\"])({url:\"/Stock/Stocktaking/searchAllStocktaking\",method:\"post\",responseType:\"blob\",data:t})}function q(t){return Object(n[\"default\"])({url:\"/Stock/Stocktaking/addStocktaking\",method:\"post\",data:t})}function J(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/inventoryStatistics\",method:\"post\",data:t})}function U(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/inventoryStatistics\",method:\"post\",responseType:\"blob\",data:t})}function F(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/searchInventoryStatistics\",method:\"post\",data:t})}function H(t){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/getAllPurchaseIn\",method:\"post\",data:t})}function K(t){return Object(n[\"default\"])({url:\"/Stock/InventoryIn/getAllInventoryInByAudit\",method:\"post\",data:t})}function Q(t,e){return Object(n[\"default\"])({url:\"/Stock/Inventory/getWarehouseInventory/\"+t,method:\"get\",data:e})}function X(t){return Object(n[\"default\"])({url:\"/Stock/Allocate/addAllocate\",method:\"post\",data:t})}function Y(t){return Object(n[\"default\"])({url:\"/stock/Inventory/getInventoryByWarehouseId\",method:\"post\",data:t})}function Z(t){return Object(n[\"default\"])({url:\"/Stock/Allocate/getAllAllocate\",method:\"post\",data:t})}function tt(t,e){return Object(n[\"default\"])({url:\"/Stock/Allocate/deleteAllocate/\"+t,method:\"delete\",data:e})}function et(t,e){return Object(n[\"default\"])({url:\"/Stock/Allocate/getAllocateInfo/\"+t,method:\"get\",data:e})}function ot(t,e){return Object(n[\"default\"])({url:\"/Stock/Allocate/updateAllocate/\"+t,method:\"post\",data:e})}function nt(t,e){return Object(n[\"default\"])({url:\"/Stock/Allocate/auditAllocate/\"+t,method:\"put\",data:e})}function rt(t){return Object(n[\"default\"])({url:\"/Stock/Allocate/searchAllocate\",method:\"post\",data:t})}function at(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/getBatchByIds\",method:\"post\",data:t})}function ct(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/getSkuNum\",method:\"post\",data:t})}function st(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/getMasterSkuNum\",method:\"post\",data:t})}function it(t){return Object(n[\"default\"])({url:\"/Stock/ReservoirArea/addReservoir\",method:\"post\",data:t})}function lt(t,e){return Object(n[\"default\"])({url:\"/Stock/ReservoirArea/getReservoirInfo/\"+t,method:\"get\",data:e})}function ut(t){return Object(n[\"default\"])({url:\"/Stock/ReservoirArea/getAllReservoir\",method:\"post\",data:t})}function dt(t){return Object(n[\"default\"])({url:\"/Stock/ReservoirArea/getListReservoir\",method:\"post\",data:t})}function ht(t,e){return Object(n[\"default\"])({url:\"/Stock/ReservoirArea/enableReservoir/\"+t,method:\"put\",data:e})}function pt(t,e){return Object(n[\"default\"])({url:\"/Stock/ReservoirArea/updateReservoir/\"+t,method:\"put\",data:e})}function ft(t,e){return Object(n[\"default\"])({url:\"/Stock/ReservoirArea/deleteReservoir/\"+t,method:\"get\",data:e})}function mt(t){return Object(n[\"default\"])({url:\"/Stock/StorageLocation/getAllStorageLocation\",method:\"post\",data:t})}function kt(t){return Object(n[\"default\"])({url:\"/Stock/StorageLocation/addStorageLocation\",method:\"post\",data:t})}function gt(t,e){return Object(n[\"default\"])({url:\"/Stock/StorageLocation/getStorageLocationInfo/\"+t,method:\"post\",data:e})}function _t(t,e){return Object(n[\"default\"])({url:\"/Stock/StorageLocation/enableStorageLocation/\"+t,method:\"post\",data:e})}function bt(t,e){return Object(n[\"default\"])({url:\"/Stock/StorageLocation/updateStorageLocation/\"+t,method:\"post\",data:e})}function It(t){return Object(n[\"default\"])({url:\"/Stock/Inventory/getAreaDateBySkuId\",method:\"post\",data:t})}function St(t){return Object(n[\"default\"])({url:\"/Stock/ReportLoss/addReportLoss\",method:\"post\",data:t})}function yt(t){return Object(n[\"default\"])({url:\"/Stock/ReportLoss/getAllReportLoss\",method:\"post\",data:t})}function vt(t,e){return Object(n[\"default\"])({url:\"/Stock/ReportLoss/getReportLossInfo/\"+t,method:\"get\",data:e})}function Ot(t,e){return Object(n[\"default\"])({url:\"/Stock/ReportLoss/auditReportLoss/\"+t,method:\"put\",data:e})}function At(t,e){return Object(n[\"default\"])({url:\"/Stock/ReportLoss/deleteReportLoss/\"+t,method:\"delete\",data:e})}function jt(t){return Object(n[\"default\"])({url:\"Stock/InventoryIn/countPurchaseCost\",method:\"post\",data:t})}function wt(t){return Object(n[\"default\"])({url:\"stock/Inventory/getInventoryByWarehouseId\",responseType:\"blob\",method:\"post\",data:t})}function Gt(t){return Object(n[\"default\"])({url:\"Stock/Allocate/getAllAllocate\",responseType:\"blob\",method:\"post\",data:t})}function xt(t,e){return Object(n[\"default\"])({url:\"Stock/Picking/getPickingInfo/\"+t,method:\"post\",data:e})}function Dt(t){return Object(n[\"default\"])({url:\"Stock/Picking/addPicking\",method:\"post\",data:t})}function Ct(t){return Object(n[\"default\"])({url:\"Stock/Picking/getAllPicking\",method:\"post\",data:t})}function Nt(t){return Object(n[\"default\"])({url:\"Stock/Picking/getAllPickingGoodsDetail\",method:\"post\",data:t})}},\"8d2f\":function(t,e,o){},aa0c:function(t,e,o){\"use strict\";o.r(e);var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o(\"ContainerTit\",[o(\"div\",{attrs:{slot:\"headr\"},slot:\"headr\"},[o(\"el-button\",{attrs:{type:\"primary\",loading:t.submitLoading},on:{click:function(e){return t.onSubmit(\"formData\")}}},[t._v(\" 提交 \")])],1),o(\"el-card\",{staticClass:\"box-card\",attrs:{shadow:\"never\"}},[o(\"div\",{staticClass:\"clearfix\",attrs:{slot:\"header\"},slot:\"header\"},[o(\"span\",[t._v(\"基本信息\")])]),o(\"el-form\",{ref:\"formData\",attrs:{model:t.formData,\"label-width\":\"100px\",inline:\"\"}},[o(\"el-form-item\",{attrs:{label:\"操作人:\",prop:\"userId\"}},[t._v(\" \"+t._s(t.formData.operatorName)+\" \")]),o(\"el-form-item\",{attrs:{label:\"仓库:\",prop:\"warehouseId\"}},[o(\"el-select\",{staticStyle:{width:\"150px\"},attrs:{disabled:\"\",placeholder:\"请选择\"},model:{value:t.formData.warehouseId,callback:function(e){t.$set(t.formData,\"warehouseId\",e)},expression:\"formData.warehouseId\"}},t._l(t.warehouseData,(function(t){return o(\"el-option\",{key:t.id,attrs:{label:t.warehouseName,value:t.id}})})),1)],1),o(\"el-form-item\",{attrs:{label:\"备注:\",prop:\"remark\"}},[o(\"el-input\",{staticStyle:{width:\"369px\"},attrs:{rows:3,placeholder:\"请输入内容\"},model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,\"remark\",e)},expression:\"formData.remark\"}})],1)],1)],1),o(\"el-card\",{staticClass:\"box-card\",attrs:{shadow:\"never\"}},[o(\"div\",{staticClass:\"clearfix\",attrs:{slot:\"header\"},slot:\"header\"},[o(\"span\",[t._v(\"商品信息\")]),o(\"div\",{staticClass:\"table-info clearfix float_right\"},[o(\"p\",{staticClass:\"float_left\",staticStyle:{\"margin-right\":\"20px\"}},[t._v(\" 共 \"+t._s(t.selectGoodsData.length)+\" 件商品,合计金额 \"+t._s(t.$_common.formattedNumber(t.priceAllNum))+\"。 \")])])]),o(\"el-table\",{attrs:{data:t.selectGoodsData}},[o(\"el-table-column\",{attrs:{type:\"index\",align:\"center\",label:\"#\",width:\"60px\"}}),o(\"el-table-column\",{attrs:{prop:\"materielName\",align:\"center\",label:\"商品名称\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[o(\"ConditionSelGoods\",{attrs:{type:!0,\"is-reveal-sku\":4,\"spec-check\":t.spec_check},on:{goodsVisibleChange:function(o){return t.goodsVisibleChange(o,e.$index)},specSelConfirm:t.specSelConfirm,selGoods:t.selGoods},model:{value:e.row.materielName,callback:function(o){t.$set(e.row,\"materielName\",o)},expression:\"scope.row.materielName\"}})]}}])}),o(\"el-table-column\",{attrs:{prop:\"unitName\",align:\"center\",label:\"单位\"}}),o(\"el-table-column\",{attrs:{prop:\"skuName\",align:\"center\",label:\"属性\"}}),o(\"el-table-column\",{attrs:{align:\"center\",label:\"采购量\"},scopedSlots:t._u([{key:\"header\",fn:function(e){return[o(\"el-popover\",{attrs:{placement:\"bottom\",width:\"260\"},model:{value:t.multip_num_show,callback:function(e){t.multip_num_show=e},expression:\"multip_num_show\"}},[o(\"p\",{staticStyle:{\"font-size\":\"12px\",\"font-weight\":\"bold\"}},[t._v(\"批量设置采购量\")]),o(\"el-input-number\",{staticStyle:{width:\"100%\",margin:\"10px 0\"},attrs:{min:0,size:\"small\",placeholder:\"批量设置采购量\"},model:{value:t.multip_num,callback:function(e){t.multip_num=e},expression:\"multip_num\"}}),o(\"div\",{staticStyle:{\"text-align\":\"right\"}},[o(\"el-button\",{attrs:{size:\"mini\",type:\"text\"},on:{click:function(e){t.multip_num_show=!1}}},[t._v(\" 取消 \")]),o(\"el-button\",{attrs:{type:\"primary\",size:\"mini\"},on:{click:function(o){return t.setMultipNum(e.$index)}}},[t._v(\" 确定 \")])],1),o(\"div\",{attrs:{slot:\"reference\"},slot:\"reference\"},[o(\"span\",{staticStyle:{\"margin-right\":\"10px\"}},[t._v(\"采购量\")]),o(\"i\",{staticClass:\"el-icon-edit\"})])],1)]}},{key:\"default\",fn:function(e){return[o(\"el-input-number\",{attrs:{size:\"small\",min:1,controls:!1},model:{value:e.row.num,callback:function(o){t.$set(e.row,\"num\",o)},expression:\"scope.row.num\"}})]}}])}),o(\"el-table-column\",{attrs:{align:\"center\",label:\"采购价(元)\"},scopedSlots:t._u([{key:\"header\",fn:function(e){return[o(\"el-popover\",{attrs:{placement:\"bottom\",width:\"260\"},model:{value:t.multip_pride_show,callback:function(e){t.multip_pride_show=e},expression:\"multip_pride_show\"}},[o(\"p\",{staticStyle:{\"font-size\":\"12px\",\"font-weight\":\"bold\"}},[t._v(\"批量设置采购价\")]),o(\"el-input-number\",{staticStyle:{width:\"100%\",margin:\"10px 0\"},attrs:{min:0,size:\"small\",placeholder:\"批量设置采购价\"},model:{value:t.multip_pride,callback:function(e){t.multip_pride=e},expression:\"multip_pride\"}}),o(\"div\",{staticStyle:{\"text-align\":\"right\"}},[o(\"el-button\",{attrs:{size:\"mini\",type:\"text\"},on:{click:function(e){t.multip_pride_show=!1}}},[t._v(\" 取消 \")]),o(\"el-button\",{attrs:{type:\"primary\",size:\"mini\"},on:{click:function(o){return t.setMultipNum(e.$index)}}},[t._v(\" 确定 \")])],1),o(\"div\",{attrs:{slot:\"reference\"},slot:\"reference\"},[o(\"span\",{staticStyle:{\"margin-right\":\"10px\"}},[t._v(\"采购价(元)\")]),o(\"i\",{staticClass:\"el-icon-edit\"})])],1)]}},{key:\"default\",fn:function(e){return[o(\"el-input-number\",{attrs:{controls:!1,size:\"small\",precision:2,step:1},model:{value:e.row.costPrice,callback:function(o){t.$set(e.row,\"costPrice\",o)},expression:\"scope.row.costPrice\"}})]}}])}),o(\"el-table-column\",{attrs:{align:\"center\",label:\"小计(元)\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[o(\"p\",[t._v(t._s(e.row.num*e.row.costPrice||0))])]}}])}),o(\"el-table-column\",{attrs:{prop:\"date\",align:\"center\",label:\"操作\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[o(\"el-button\",{attrs:{type:\"text\",size:\"mini\",disabled:1===t.selectGoodsData.length},on:{click:function(o){return t.clearGoodsItem(e.$index)}}},[t._v(\" 删除 \")]),o(\"el-button\",{attrs:{type:\"text\",size:\"mini\"},on:{click:t.addListGoods}},[t._v(\" 新增 \")])]}}])})],1)],1)],1)},r=[],a=o(\"478b\"),c=o(\"d177\"),s={name:\"NewStart\",components:{ConditionSelGoods:c[\"default\"]},data(){return{multip_num:\"\",multip_num_show:!1,multip_pride:\"\",multip_pride_show:!1,show_goods:!1,submitLoading:!1,formData:{warehouseId:0,operatorName:\"\",remark:\"\",paramsMaterielData:[{materielId:\"\",materielName:\"\",materielCode:\"\",skuId:\"\",num:\"\",costPrice:\"\"}]},spec_check:[],goods_index:0,selectGoodsData:[{materielId:\"\",materielName:\"\",materielCode:\"\",skuId:\"\",skuName:\"\",unitName:\"\",num:1,costPrice:0}],warehouseId:\"\",warehouseData:[]}},computed:{priceAllNum(){if(this.selectGoodsData.length>1){let t=0;for(let e=0;e<this.selectGoodsData.length;e++){const o=this.selectGoodsData[e];t+=o.num*(o.costPrice||0)}return t}return 1===this.selectGoodsData.length?this.selectGoodsData[0].num*this.selectGoodsData[0].costPrice:0}},created(){this.getAllWarehouse(),this.formData.warehouseId=parseInt(this.$route.query.id),this.formData.operatorName=this.userName},activated(){this.$_isInit()||(this.getAllWarehouse(),this.formData.warehouseId=parseInt(this.$route.query.id),this.formData.operatorName=this.userName)},methods:{selGoods(t){let e=this.$_common.deepClone(this.selectGoodsData);const o=t.map(t=>{let e=t.specGroup.map(t=>t.specValueName).join(\"_\");return{materielId:t.id,materielName:t.title,materielCode:t.code,skuId:t.skuId,skuName:e,unitName:t.unitName,num:1,costPrice:1}}),n=e.some(t=>t.materielId);e=n?this.$_common.unique(e.concat(o),[\"materielId\",\"skuId\"]):o,this.selectGoodsData=e},specSelConfirm(t){let e=this.$_common.deepClone(this.selectGoodsData);const o=t.goodsD.map(e=>({materielId:t.now_goods_data.materielId,materielName:t.now_goods_data.title,materielCode:t.now_goods_data.code,skuId:e.skuId,skuName:e.spec.specGropName,unitName:e.spec.unitName,num:1,costPrice:1}));e[this.goods_index].skuId||e.splice(this.goods_index,1),o.forEach(t=>{const o=e.find(e=>e.skuId===t.skuId);o||e.unshift(t)}),this.selectGoodsData=e},goodsVisibleChange(t,e){t&&(this.goods_index=e)},addListGoods(){this.selectGoodsData.push({materielId:\"\",materielName:\"\",materielCode:\"\",skuId:\"\",skuName:\"\",unitName:\"\",num:1,costPrice:0})},async getAllWarehouse(){const{data:t}=await Object(a[\"getAllWarehouse\"])({page:1,pageSize:999});this.warehouseData=t},onSubmit(t){this.$refs[t].validate(async t=>{if(t){const t={...this.formData,paramsMaterielData:this.$_common.deepClone(this.selectGoodsData).map(t=>(delete t.unitName,delete t.skuName,t))};console.log(this.selectGoodsData);let e=!1;if(!this.selectGoodsData[0].materielId)return void this.$message.warning(\"第一项商品不能为空\");if(this.selectGoodsData.forEach(t=>{t.materielId||(e=!0)}),e)return void this.$message.warning(\"所有商品名称不能为空\");if(!t.paramsMaterielData.length)return;this.submitLoading=!0;try{await Object(a[\"addWarehouseBeginning\"])(t);this.submitLoading=!1,this.$message.success(\"操作成功\"),this.$closeCurrentGoEdit(\"/stock/WarehouseManagement/Management\")}catch{this.submitLoading=!1}}})},clearGoodsItem(t){this.selectGoodsData.splice(t,1)},setMultipNum(t){4===t?this.multip_num_show=!1:this.multip_pride_show=!1,this.selectGoodsData.forEach(e=>{4===t?e.num=this.multip_num:e.costPrice=this.multip_pride})}}},i=s,l=(o(\"ef27\"),o(\"2877\")),u=Object(l[\"a\"])(i,n,r,!1,null,\"3096fc26\",null);e[\"default\"]=u.exports},d177:function(t,e,o){\"use strict\";o.r(e);var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o(\"div\",{staticClass:\"out-div\"},[o(\"el-select\",{staticStyle:{width:\"100%\"},attrs:{size:t.size,value:t.value,filterable:\"\",remote:\"\",\"reserve-keyword\":\"\",disabled:t.disabled,placeholder:\"请输入关键词首字母\",\"remote-method\":t.remoteMethod,loading:t.select_loading},on:{change:t.selectSelGoods,\"visible-change\":t.goodsVisibleChange}},t._l(t.goods_options,(function(t,e){return o(\"el-option\",{key:e,attrs:{label:t.title,value:t.id}})})),1),o(\"span\",{staticClass:\"el-icon-search sel-icon\",on:{click:t.openGoodsModel}}),o(\"el-dialog\",{staticStyle:{\"text-align\":\"left\"},attrs:{\"close-on-press-escape\":!1,\"close-on-click-modal\":!1,title:\"选择属性\",visible:t.spec_model,width:\"40%\"},on:{\"update:visible\":function(e){t.spec_model=e}}},[o(\"el-checkbox\",{on:{change:t.checkAllSpecChange},model:{value:t.check_all_spec,callback:function(e){t.check_all_spec=e},expression:\"check_all_spec\"}},[t._v(\" 全选 \")]),t._l(t.spec_check_list,(function(e,n){return o(\"div\",{key:n,staticStyle:{padding:\"10px\",border:\"1px solid #eee\",margin:\"10px 0\"}},[o(\"el-checkbox\",{attrs:{indeterminate:e.is_spec_indeterminate},on:{change:function(e){return t.checkUnitSpecChange(e,n)}},model:{value:e.check_unit_spec,callback:function(o){t.$set(e,\"check_unit_spec\",o)},expression:\"item.check_unit_spec\"}},[t._v(\" \"+t._s(e.unitName)+\" \")]),o(\"div\",{staticStyle:{padding:\"10px 15px 0\"}},[o(\"el-checkbox-group\",{on:{change:function(e){return t.specCheckChange(e,n)}},model:{value:e.spec_check,callback:function(o){t.$set(e,\"spec_check\",o)},expression:\"item.spec_check\"}},t._l(e.children,(function(e,n){return o(\"el-checkbox\",{key:n,staticStyle:{\"padding-bottom\":\"5px\"},attrs:{label:e.id}},[o(\"span\",{staticStyle:{\"font-weight\":\"400\"}},[t._v(t._s(e.specGropName))])])})),1)],1)],1)})),o(\"span\",{staticClass:\"dialog-footer\",attrs:{slot:\"footer\"},slot:\"footer\"},[o(\"el-button\",{on:{click:function(e){t.spec_model=!1}}},[t._v(\"取 消\")]),o(\"el-button\",{attrs:{type:\"primary\"},on:{click:t.specSelConfirm}},[t._v(\"确 定\")])],1)],2),t.show_goods?o(\"SaleGoodsSel\",{attrs:{\"merchant-id\":t.merchantId,\"base-goods\":t.type,\"is-show\":t.show_goods,\"user-center-id\":t.userCenterId,\"is-reveal-sku\":4,\"is-eq-master\":t.isEqMaster,\"is-purchase\":t.isPurchase,\"shop-id\":t.shopId},on:{cancel:function(e){t.show_goods=!1},confirm:t.selGoods}}):t._e()],1)},r=[],a=o(\"c40e\"),c=o(\"0d53\"),s={name:\"ConditionSelGoods\",components:{SaleGoodsSel:c[\"default\"]},model:{prop:\"value\",event:\"change\"},props:{merchantId:{type:[Number,String],default:\"\"},type:{type:Boolean,default:!1},isPurchase:{type:Boolean,default:!1},isEqMaster:{type:Boolean,default:!0},isAddGoods:{type:[Number,String],default:5},userCenterId:{type:[Number,String],default:\"\"},shopId:{type:[Number,String,Array],default:\"\"},enableStatus:{type:[Number,String],default:\"\"},value:{type:String,default:\"\"},disabled:{type:Boolean,default:!1},specCheck:{type:Array,default:()=>[]},isRevealSku:{type:[Number,String],default:4},size:{type:String,default:\"small\"}},data(){return{goodsName:\"\",goods_options:[],show_goods:!1,select_loading:!1,spec_model:!1,check_all_spec:!1,is_spec_indeterminate:!1,spec_check:[],spec_check_list:[],now_goods_data:{}}},watch:{specCheck(t){this.spec_check=t}},mounted(){console.log(this.isPurchase)},methods:{openGoodsModel(){this.disabled||(this.show_goods=!0)},async remoteMethod(t){if(!t)return void(this.goods_options=[]);let e={condition:t,type:this.type,enableStatus:this.enableStatus};this.shopId&&(e.shopId=Array.isArray(this.shopId)?this.shopId:[this.shopId]),this.merchantId&&(e.merchantId=this.merchantId),this.select_loading=!0;const{data:o}=await Object(a[\"getGoodsByCondition\"])(e);this.select_loading=!1,\"{}\"===JSON.stringify(o)?this.goods_options=[]:this.goods_options=o},goodsVisibleChange(t){this.$emit(\"goodsVisibleChange\",t)},selectSelGoods(t){this.$emit(\"selectSelGoods\",t),this.check_all_spec=!1,this.type?this.getGoodsBasicInfoById(t):this.getGoodsInfo(t)},async getGoodsInfo(t){const{data:e}=await Object(a[\"getGoodsInfo\"])(t,{userCenterId:this.userCenterId});this.now_goods_data=e,this.spec_model=!0,2===e.specType?this.spec_check_list=e.unitData.map(t=>({...t,is_spec_indeterminate:!1,check_unit_spec:!1,spec_check:[],children:e.specMultiple.filter(e=>e.unitId===t.unitId).map(t=>({...t,specGropName:t.specGroup.map(t=>t.specValueName).join(\"_\")}))})):this.spec_check_list=e.specMultiple.map(t=>({...t,is_spec_indeterminate:!1,check_unit_spec:!1,spec_check:[]})),1!==this.spec_check_list.length||this.spec_check_list[0].children?1===this.spec_check_list.length&&1===this.spec_check_list[0].children.length&&(this.spec_model=!1,this.$emit(\"specSelConfirm\",{goodsD:[{skuId:this.spec_check_list[0].children[0].id,spec:this.spec_check_list[0].children[0]}],spec_check_list:this.spec_check_list,now_goods_data:this.now_goods_data})):(this.spec_model=!1,this.$emit(\"specSelConfirm\",{goodsD:[{skuId:this.spec_check_list[0].id,spec:this.spec_check_list[0]}],spec_check_list:this.spec_check_list,now_goods_data:this.now_goods_data}))},async getGoodsBasicInfoById(t){const{data:e}=await Object(a[\"getGoodsBasicInfoById\"])(t,{isAddGoods:this.isAddGoods});this.now_goods_data=e,this.spec_model=!0,2===e.specType?this.spec_check_list=e.unitData.map(t=>({...t,is_spec_indeterminate:!1,check_unit_spec:!1,spec_check:[],children:e.specMultiple.filter(e=>e.unitId===t.unitId).map(t=>({...t,specGropName:t.specGroup.map(t=>t.specValueName).join(\"_\")}))})):this.spec_check_list=e.specMultiple.map(t=>({...t,is_spec_indeterminate:!1,check_unit_spec:!1,spec_check:[]})),this.isPurchase&&5===e.isEq&&(this.spec_check_list=this.spec_check_list.filter(t=>5===t.isMaster))},specSelConfirm(){let t=[],e=[];2===this.now_goods_data.specType?(this.spec_check_list.forEach(e=>{e.spec_check&&e.spec_check.length&&t.push(e.spec_check.join(\",\"))}),this.spec_check=t.join(\",\").split(\",\").map(t=>parseInt(t)),e=this.spec_check.map(t=>{let e={};for(let o in this.spec_check_list){let n=this.spec_check_list[o];const r=n.children&&n.children.length?n.children.find(e=>e.id===t):\"\";if(r){e=r;break}}return{skuId:t,spec:e}})):e=this.spec_check_list.filter(t=>t.check_unit_spec).map(t=>({skuId:t.id,spec:t})),this.$emit(\"specSelConfirm\",{goodsD:e,spec_check_list:this.spec_check_list,now_goods_data:this.now_goods_data}),this.spec_model=!1},specCheckChange(t,e){const o=this.$_common.deepClone(this.spec_check_list);let n=t.length;o[e].check_unit_spec=n===o[e].children.length,o[e].is_spec_indeterminate=n>0&&n<o[e].children.length,this.spec_check_list=o,this.check_all_spec=this.spec_check_list.every(t=>t.check_unit_spec)},checkAllSpecChange(t){this.spec_check_list.forEach(e=>{e.check_unit_spec=t,e.is_spec_indeterminate=!1,e.spec_check=t&&e.children&&e.children.length?e.children.map(t=>t.id):[]}),this.is_spec_indeterminate=!1},checkUnitSpecChange(t,e){const o=this.$_common.deepClone(this.spec_check_list);o[e].spec_check=t&&o[e].children&&o[e].children.length?o[e].children.map(t=>t.id):[],o[e].is_spec_indeterminate=!1,this.spec_check_list=o,this.check_all_spec=this.spec_check_list.every(t=>t.check_unit_spec)},selGoods(t){console.log(t),this.$emit(\"selGoods\",t)}}},i=s,l=(o(\"1ccb\"),o(\"2877\")),u=Object(l[\"a\"])(i,n,r,!1,null,\"410451b4\",null);e[\"default\"]=u.exports},ef27:function(t,e,o){\"use strict\";o(\"2d73\")}}]);","extractedComments":[]}
|