| 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-276ce92b\"],{\"01aa\":function(t,e,o){\"use strict\";o(\"8f9e\")},1244:function(t,e,o){\"use strict\";o.r(e),o.d(e,\"getAllPurchaseByFields\",(function(){return n})),o.d(e,\"exportgetAllPurchaseByFields\",(function(){return r})),o.d(e,\"addSupplier\",(function(){return s})),o.d(e,\"getSupplierInfoById\",(function(){return u})),o.d(e,\"editSupplier\",(function(){return i})),o.d(e,\"supplierEnableStatus\",(function(){return c})),o.d(e,\"delSupplier\",(function(){return l})),o.d(e,\"getAllSupplier\",(function(){return d})),o.d(e,\"retMoney\",(function(){return h})),o.d(e,\"reStockIn\",(function(){return p})),o.d(e,\"addPurchase\",(function(){return f})),o.d(e,\"getPurchaseInfoById\",(function(){return m})),o.d(e,\"updatePurchaseStatus\",(function(){return g})),o.d(e,\"delPurchase\",(function(){return b})),o.d(e,\"getAllPurchase\",(function(){return _})),o.d(e,\"exportGetAllPurchase\",(function(){return k})),o.d(e,\"editPurchase\",(function(){return y})),o.d(e,\"getAllPurchaseDetails\",(function(){return S})),o.d(e,\"exportGetAllPurchaseDetails\",(function(){return I})),o.d(e,\"searchAllPurchaseDetails\",(function(){return v})),o.d(e,\"exportSearchAllPurchaseDetails\",(function(){return O})),o.d(e,\"addPurchaseOut\",(function(){return P})),o.d(e,\"getPurchaseOutInfoById\",(function(){return w})),o.d(e,\"updatePurchaseOut\",(function(){return A})),o.d(e,\"delPurchaseOut\",(function(){return j})),o.d(e,\"getAllPurchaseOut\",(function(){return N})),o.d(e,\"exportGetAllPurchaseOut\",(function(){return C})),o.d(e,\"editPurchaseOut\",(function(){return x})),o.d(e,\"getAllData\",(function(){return D})),o.d(e,\"getAllPurchaseAndDetails\",(function(){return $})),o.d(e,\"getPurchaseAndBatchInfoById\",(function(){return G})),o.d(e,\"addSupplierUserCenter\",(function(){return L})),o.d(e,\"supplierImport\",(function(){return B}));var a=o(\"b775\");function n(t){return Object(a[\"default\"])({url:\"/purchase/purchase/getAllPurchaseByFields\",method:\"post\",data:t})}function r(t){return Object(a[\"default\"])({url:\"/purchase/purchase/getAllPurchaseByFields\",method:\"post\",responseType:\"blob\",data:t})}function s(t){return Object(a[\"default\"])({url:\"/Purchase/Supplier/addSupplier\",method:\"post\",data:t})}function u(t,e){return Object(a[\"default\"])({url:\"/Purchase/Supplier/getSupplierInfoById/\"+t,method:\"get\",data:e})}function i(t,e){return Object(a[\"default\"])({url:\"/Purchase/Supplier/editSupplier/\"+t,method:\"put\",data:e})}function c(t,e){return Object(a[\"default\"])({url:\"/Purchase/Supplier/updateEnableStatus/\"+t,method:\"put\",data:e})}function l(t,e){return Object(a[\"default\"])({url:\"/Purchase/Supplier/delSupplier/\"+t,method:\"delete\",data:e})}function d(t){return Object(a[\"default\"])({url:\"/Purchase/Supplier/getAllSupplier\",method:\"post\",data:t})}function h(t,e){return Object(a[\"default\"])({url:\"/Purchase/Purchase/retMoney/\"+t,method:\"post\",data:e})}function p(t,e){return Object(a[\"default\"])({url:\"/Purchase/Purchase/reStockIn/\"+t,method:\"post\",data:e})}function f(t){return Object(a[\"default\"])({url:\"/Purchase/Purchase/addPurchase\",method:\"post\",data:t})}function m(t,e){return Object(a[\"default\"])({url:\"/Purchase/Purchase/getPurchaseInfoById/\"+t,method:\"get\",data:e})}function g(t,e){return Object(a[\"default\"])({url:\"/Purchase/Purchase/updateAuditStatus/\"+t,method:\"put\",data:e})}function b(t,e){return Object(a[\"default\"])({url:\"/Purchase/Purchase/delPurchase/\"+t,method:\"delete\",data:e})}function _(t){return Object(a[\"default\"])({url:\"/Purchase/Purchase/getAllPurchase\",method:\"post\",data:t})}function k(t){return Object(a[\"default\"])({url:\"/Purchase/Purchase/getAllPurchase\",responseType:\"blob\",method:\"post\",data:t})}function y(t,e){return Object(a[\"default\"])({url:\"/Purchase/Purchase/editPurchase/\"+t,method:\"put\",data:e})}function S(t){return Object(a[\"default\"])({url:\"/Purchase/Purchase/getAllPurchaseDetails\",method:\"post\",data:t})}function I(t){return Object(a[\"default\"])({url:\"/Purchase/Purchase/getAllPurchaseDetails\",responseType:\"blob\",method:\"post\",data:t})}function v(t){return Object(a[\"default\"])({url:\"/Purchase/Purchase/searchAllPurchaseDetails\",method:\"post\",data:t})}function O(t){return Object(a[\"default\"])({url:\"/Purchase/Purchase/searchAllPurchaseDetails\",method:\"post\",responseType:\"blob\",data:t})}function P(t){return Object(a[\"default\"])({url:\"/Purchase/PurchaseOut/addPurchaseOut\",method:\"post\",data:t})}function w(t,e){return Object(a[\"default\"])({url:\"/Purchase/PurchaseOut/getPurchaseOutInfoById/\"+t,method:\"get\",data:e})}function A(t,e){return Object(a[\"default\"])({url:\"/Purchase/PurchaseOut/updateAuditStatus/\"+t,method:\"put\",data:e})}function j(t,e){return Object(a[\"default\"])({url:\"/Purchase/PurchaseOut/delPurchaseOut/\"+t,method:\"delete\",data:e})}function N(t){return Object(a[\"default\"])({url:\"/Purchase/PurchaseOut/getAllPurchaseOut\",method:\"post\",data:t})}function C(t){return Object(a[\"default\"])({url:\"/Purchase/PurchaseOut/getAllPurchaseOut\",responseType:\"blob\",method:\"post\",data:t})}function x(t,e){return Object(a[\"default\"])({url:\"/Purchase/PurchaseOut/editPurchase/\"+t,method:\"put\",data:e})}function D(t){return Object(a[\"default\"])({url:\"/Purchase/Purchase/getAllData\",method:\"get\",data:t})}function $(t){return Object(a[\"default\"])({url:\"/Purchase/Purchase/getAllPurchaseAndDetails\",method:\"post\",data:t})}function G(t){return Object(a[\"default\"])({url:\"/Purchase/Purchase/getPurchaseAndBatchInfoById\",method:\"post\",data:t})}function L(t,e){return Object(a[\"default\"])({url:\"Purchase/Supplier/addSupplierUserCenter/\"+t,method:\"get\",data:e})}function B(t){return Object(a[\"default\"])({url:\"Purchase/Supplier/supplierImport\",method:\"post\",data:t})}},\"12b4\":function(t,e,o){},\"13fe\":function(t,e,o){},1835:function(t,e,o){\"use strict\";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o(\"ContainerTit\",{staticClass:\"PurchaseOrderAdd\"},[o(\"div\",{staticStyle:{position:\"relative\"}},[o(\"div\",{staticClass:\"btn-top-div\"},[\"PurchaseOrderLook\"!==t.look_path?o(\"el-button\",{attrs:{loading:t.loading,disabled:!!t.$route.params.id},on:{click:function(e){return t.delPauseSave(1)}}},[t._v(\" 清除暂存 \")]):t._e(),\"PurchaseOrderLook\"!==t.look_path?o(\"el-button\",{attrs:{loading:t.loading,disabled:!!t.$route.params.id},on:{click:t.addPauseSave}},[t._v(\" 暂存 \")]):t._e(),\"PurchaseOrderLook\"!==t.look_path?o(\"el-button\",{attrs:{type:\"primary\",loading:t.loading},on:{click:t.addPurchaseOrder}},[t._v(\" 保存 \")]):t._e(),\"PurchaseOrderLook\"===t.look_path?o(\"el-button\",{attrs:{type:\"primary\",disabled:2===t.auditStatus,loading:t.loading},on:{click:t.updatePurchase}},[t._v(\" 审核 \")]):t._e()],1)]),o(\"div\",[o(\"el-form\",{ref:\"form\",attrs:{inline:!0,rules:t.purchase_rules,model:t.form,size:\"small\",disabled:\"PurchaseOrderLook\"===t.look_path}},[o(\"el-tabs\",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:\"activeName\"}},[o(\"el-tab-pane\",{attrs:{label:\"新增采购单\",name:\"one\"}},[o(\"el-row\",{staticStyle:{\"padding-bottom\":\"13px\"}},[o(\"el-col\",{attrs:{span:24}},[o(\"p\",{staticClass:\"order_midden_left_text el-icon-arrow-right\",staticStyle:{\"padding-left\":\"20px\"}},[t._v(\" 采购单信息 \")])]),t.$route.params.id?o(\"el-col\",{staticClass:\"form\",attrs:{span:6}},[o(\"el-form-item\",{attrs:{label:\"采购单号:\",prop:\"code\"}},[t._v(\" \"+t._s(t.form.code)+\" \")])],1):t._e(),o(\"el-col\",{staticClass:\"form\",attrs:{span:6}},[o(\"el-form-item\",{attrs:{label:\"采购仓库:\",prop:\"warehouseName\"}},[\"PurchaseOrderLook\"!==t.look_path?o(\"div\",[o(\"el-input\",{staticStyle:{width:\"210px\"},attrs:{placeholder:\"采购仓库\",readonly:\"\"},model:{value:t.form.warehouseName,callback:function(e){t.$set(t.form,\"warehouseName\",e)},expression:\"form.warehouseName\"}},[o(\"i\",{staticClass:\"el-input__icon el-icon-search\",attrs:{slot:\"suffix\"},on:{click:function(e){return t.openWarehouse()}},slot:\"suffix\"})])],1):o(\"span\",[t._v(t._s(t.form.warehouseName))])])],1),o(\"el-col\",{staticClass:\"form\",attrs:{span:6}},[o(\"el-form-item\",{staticStyle:{\"min-width\":\"400px\"},attrs:{label:\"供应商:\",prop:\"supplierName\"}},[\"PurchaseOrderLook\"!==t.look_path?o(\"div\",[o(\"SelectSupplier\",{attrs:{clearable:!1,width:\"210\"},on:{change:t.selUnitSupplier},model:{value:t.form.supplierId,callback:function(e){t.$set(t.form,\"supplierId\",e)},expression:\"form.supplierId\"}}),o(\"el-button\",{attrs:{size:\"mini\",type:\"text\"},on:{click:function(e){return t.$router.push(\"/Purchase/ManageP/SupplierAdd\")}}},[t._v(\" 【新建供应商】 \")])],1):o(\"span\",[t._v(t._s(t.form.supplierName))])])],1),o(\"el-col\",{staticClass:\"form\",attrs:{span:12}},[o(\"el-form-item\",{staticStyle:{\"min-width\":\"400px\"},attrs:{label:\"采购人员:\",prop:\"buyerId\"}},[\"PurchaseOrderLook\"!==t.look_path?o(\"div\",[o(\"el-input\",{staticStyle:{width:\"210px\"},attrs:{placeholder:\"采购人员:\",readonly:\"\"},model:{value:t.form.buyerName,callback:function(e){t.$set(t.form,\"buyerName\",e)},expression:\"form.buyerName\"}},[o(\"i\",{staticClass:\"el-input__icon el-icon-search\",attrs:{slot:\"suffix\"},on:{click:function(e){t.staff_show=!0}},slot:\"suffix\"})]),\"PurchaseOrderLook\"!==t.look_path?o(\"el-button\",{attrs:{type:\"text\",size:\"mini\"},on:{click:function(e){t.add_staff=!0}}},[t._v(\" 【新建人员】 \")]):t._e()],1):o(\"span\",[t._v(t._s(t.form.buyerName))])])],1),o(\"el-col\",{staticClass:\"form\",attrs:{span:6}},[o(\"el-form-item\",{attrs:{label:\"制单人员:\"}},[t._v(\" \"+t._s(t.form.operatorName)+\" \")])],1),o(\"el-col\",{staticClass:\"form\",attrs:{span:6}},[o(\"el-form-item\",{attrs:{label:\"制单时间:\"}},[o(\"span\",[t._v(t._s(t.$_common.formatDate(t.createTime)))])])],1),2===t.auditStatus?o(\"el-col\",{staticClass:\"form\",attrs:{span:6}},[o(\"el-form-item\",{attrs:{label:\"审核人员:\"}},[t._v(\" \"+t._s(t.auditName)+\" \")])],1):t._e(),2===t.auditStatus?o(\"el-col\",{staticClass:\"form\",attrs:{span:6}},[o(\"el-form-item\",{attrs:{label:\"审核时间:\"}},[o(\"span\",[t._v(t._s(t.$_common.formatDate(t.auditTime)))])])],1):t._e(),\"PurchaseOrderLook\"===t.look_path&&2===t.auditStatus?o(\"el-col\",{staticClass:\"form\",attrs:{span:6}},[o(\"el-form-item\",{attrs:{label:\"审核状态:\"}},[o(\"el-tag\",{attrs:{type:\"success\"}},[t._v(\"已审核\")])],1)],1):t._e()],1),t.err_tip_list.length?o(\"el-alert\",{attrs:{title:\"采购数量换算提示\",type:\"error\",\"show-icon\":\"\",\"close-text\":\"知道了\"}},[o(\"ul\",t._l(t.err_tip_list,(function(e,a){return o(\"li\",{key:a},[t._v(\" 商品【\"+t._s(e.goodsName)+\"】,单位【\"+t._s(e.unitName)+\"】,编码【\"+t._s(e.goodsCode)+\"】,数量换算有误:\"+t._s(e.title)+\" \")])})),0)]):t._e()],1)],1),o(\"div\",{staticClass:\"order_bottom\"},[o(\"p\",{staticClass:\"text\"},[t._v(\"商品清单\")]),o(\"el-table\",{attrs:{data:t.goods_list,\"show-summary\":\"\",size:\"mini\",\"summary-method\":t.getSummaries}},[o(\"el-table-column\",{attrs:{label:\"#\",width:\"60\",type:\"index\"}}),o(\"el-table-column\",{attrs:{label:\"商品编码\",width:\"140\",prop:\"goodsCode\",\"show-overflow-tooltip\":\"\"}}),o(\"el-table-column\",{attrs:{prop:\"goodsName\",label:\"商品名称\",\"min-width\":\"180\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[\"PurchaseOrderLook\"!==t.look_path?o(\"span\",[o(\"ConditionSelGoods\",{attrs:{type:!0,\"merchant-id\":t.merchantId,\"is-reveal-sku\":4,\"enable-status\":5,\"is-add-goods\":5,\"spec-check\":t.spec_check,\"is-purchase\":!0},on:{selGoods:t.selGoods,goodsVisibleChange:function(o){return t.goodsVisibleChange(o,e.$index)},specSelConfirm:t.specSelConfirm},model:{value:e.row.goodsName,callback:function(o){t.$set(e.row,\"goodsName\",o)},expression:\"scope.row.goodsName\"}})],1):o(\"span\",[t._v(\" \"+t._s(e.row.goodsName)+\" \")])]}}])}),o(\"el-table-column\",{attrs:{prop:\"specGropName\",label:\"规格\",\"min-width\":\"120\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[e.row.unitName?o(\"span\",[t._v(t._s(e.row.unitName)+\";\")]):t._e(),o(\"span\",[t._v(t._s(e.row.specGropName))])]}}])}),o(\"el-table-column\",{attrs:{prop:\"buyerNum\",label:\"采购数量\",\"min-width\":\"100\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[o(\"el-input-number\",{staticStyle:{width:\"100%\"},attrs:{size:\"mini\",min:0,type:\"text\",placeholder:\"数量\",controls:!1},on:{blur:function(o){return t.editNumChange(e.$index,\"buyerNum\")}},model:{value:e.row.buyerNum,callback:function(o){t.$set(e.row,\"buyerNum\",o)},expression:\"scope.row.buyerNum\"}})]}}])}),o(\"el-table-column\",{attrs:{prop:\"buyerNum\",label:\"其他单位\",\"min-width\":\"100\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[o(\"vxe-input\",{staticStyle:{width:\"100%\"},attrs:{size:\"mini\",min:0,placeholder:\"其他单位\",controls:!1,disabled:4===e.row.isEq,type:\"integer\"},on:{blur:function(o){return t.editNumChange(e.$index,\"buyerNum\")}},model:{value:e.row.otherNum,callback:function(o){t.$set(e.row,\"otherNum\",o)},expression:\"scope.row.otherNum\"}})]}}])}),o(\"el-table-column\",{attrs:{prop:\"skuValue\",label:\"换算比例数量\",\"min-width\":\"120\"}}),o(\"el-table-column\",{attrs:{prop:\"skuNum\",label:\"转换数量\",\"min-width\":\"80\"}}),o(\"el-table-column\",{attrs:{prop:\"buyerUnitPrice\",label:\"采购单价\",\"min-width\":\"100\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[o(\"el-input-number\",{staticStyle:{width:\"100%\"},attrs:{size:\"mini\",controls:!1,min:0,type:\"text\",placeholder:\"单价\"},on:{blur:function(o){return t.editNumChange(e.$index)}},model:{value:e.row.buyerUnitPrice,callback:function(o){t.$set(e.row,\"buyerUnitPrice\",o)},expression:\"scope.row.buyerUnitPrice\"}})]}}])}),o(\"el-table-column\",{attrs:{prop:\"subtotalPrice\",label:\"小计金额\",\"min-width\":\"100\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[t._v(\" \"+t._s(t.$_common.formattedNumber(e.row.subtotalPrice))+\" \")]}}])}),\"PurchaseOrderLook\"===t.look_path?o(\"el-table-column\",{attrs:{prop:\"storage\",label:\"货架编码\",\"min-width\":\"100\"}}):t._e(),\"PurchaseOrderLook\"===t.look_path?o(\"el-table-column\",{attrs:{prop:\"barCode\",label:\"商品条码\",\"min-width\":\"100\"}}):t._e(),\"PurchaseOrderLook\"!==t.look_path?o(\"el-table-column\",{attrs:{label:\"管理\",fixed:\"right\",width:\"160\",align:\"center\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[o(\"el-button\",{attrs:{type:\"text\",size:\"mini\",disabled:1===t.goods_list.length},on:{click:function(o){return t.delData(e.$index,e.row)}}},[t._v(\" 删除 \")]),o(\"el-button\",{attrs:{type:\"text\",size:\"mini\"},on:{click:function(o){return t.otherSet(e.$index,e.row)}}},[t._v(\" 同步 \")])]}}],null,!1,3535365623)}):t._e()],1),o(\"div\",{staticClass:\"table-b-div\"},[o(\"div\",{staticClass:\"table-b-div-cont\",on:{click:t.addListGoods}},[o(\"el-button\",{attrs:{type:\"text\",size:\"mini\"},on:{click:t.addListGoods}},[o(\"i\",{staticClass:\"el-icon-plus\"}),t._v(\" 新增 \")])],1)]),o(\"div\",{staticClass:\"clearfix other-price-view\"},[o(\"div\",{staticClass:\"float_left\"},[o(\"el-form-item\",{attrs:{label:\"备注:\"}},[o(\"el-input\",{staticStyle:{width:\"360px\"},attrs:{size:\"small\",placeholder:\"备注\"},model:{value:t.form.remark,callback:function(e){t.$set(t.form,\"remark\",e)},expression:\"form.remark\"}})],1)],1),o(\"div\",{staticClass:\"float_right\"},[o(\"el-form-item\",{attrs:{label:\"其他金额:\"}},[o(\"el-input-number\",{staticStyle:{width:\"100px\"},attrs:{size:\"small\",controls:!1,min:0,placeholder:\"其他金额\"},model:{value:t.form.otherAmount,callback:function(e){t.$set(t.form,\"otherAmount\",e)},expression:\"form.otherAmount\"}})],1),o(\"el-form-item\",{attrs:{label:\"优惠金额:\"}},[o(\"el-input-number\",{staticStyle:{width:\"100px\"},attrs:{size:\"small\",controls:!1,min:0,max:t.purchaseAmount,placeholder:\"优惠金额\"},model:{value:t.form.couponAmount,callback:function(e){t.$set(t.form,\"couponAmount\",e)},expression:\"form.couponAmount\"}})],1),o(\"el-form-item\",{attrs:{label:\"采购金额:\"}},[o(\"el-input\",{staticStyle:{width:\"100px\"},attrs:{size:\"small\",placeholder:\"采购金额\"},model:{value:t.purchaseAmount,callback:function(e){t.purchaseAmount=e},expression:\"purchaseAmount\"}})],1)],1)])],1)],1)],1),t.add_staff?o(\"AddStaff\",{attrs:{visible:t.add_staff},on:{close:function(e){t.add_staff=!1}}}):t._e(),t.staff_show?o(\"StaffList\",{attrs:{\"is-show\":t.staff_show,\"is-check\":!1,isserch:!0},on:{cancel:function(e){t.staff_show=!1},confirm:t.staffSel}}):t._e(),t.warehouse_show?o(\"WarehouseModel\",{attrs:{\"is-check\":!1,\"is-show\":t.warehouse_show},on:{confirm:t.selWarehouse,cancel:function(e){t.warehouse_show=!1}}}):t._e(),o(\"el-dialog\",{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\",{attrs:{indeterminate:t.is_spec_indeterminate},on:{change:t.checkAllSpecChange},model:{value:t.check_all_spec,callback:function(e){t.check_all_spec=e},expression:\"check_all_spec\"}},[t._v(\" 全选 \")]),o(\"div\",{staticStyle:{margin:\"15px 0\"}}),o(\"el-checkbox-group\",{on:{change:t.specCheckChange},model:{value:t.spec_check,callback:function(e){t.spec_check=e},expression:\"spec_check\"}},t._l(t.spec_check_list,(function(e,a){return o(\"el-checkbox\",{key:a,staticStyle:{\"padding-bottom\":\"5px\"},attrs:{label:e.id}},[t._v(\" \"+t._s(e.specGropName)+\" \")])})),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)],1)],1)},n=[],r=(o(\"caad\"),o(\"b314\")),s=o(\"4b63\"),u=o(\"55d15\"),i=o(\"7a21\"),c=o(\"d177\"),l=(o(\"64f1\"),o(\"478b\")),d=o(\"1244\"),h=o(\"2934\"),p=o(\"2f62\");const f={basicGoodsId:\"\",goodsCode:\"\",goodsName:\"\",skuId:\"\",unitName:\"\",categoryId:\"\",categoryName:\"\",buyerNum:0,buyerUnitPrice:0,subtotalPrice:0,couponAmount:0,otherAmount:0};var m={name:\"PurchaseOrderAdd\",components:{ConditionSelGoods:c[\"default\"],SelectSupplier:r[\"default\"],AddStaff:u[\"default\"],WarehouseModel:s[\"default\"],StaffList:i[\"default\"]},data(){const t=(t,e,o)=>{e?o():o(new Error(\"请选择采购仓库\"))},e=(t,e,o)=>{e?o():o(new Error(\"请选择供应商\"))};return{err_tip_list:[],now_goods_data:{},spec_check:[],auditTime:\"\",spec_check_list:[],show_goods:!1,select_loading:!1,check_all_spec:!1,is_spec_indeterminate:!1,spec_model:!1,add_staff:!1,loading:!1,createTime:(new Date).getTime(),auditName:\"\",auditId:\"\",auditStatus:\"\",look_path:\"\",goods_options:[],del_goods_id:[],warehouse_list:[],form:{code:\"\",shopId:\"\",shopName:\"\",supplierId:\"\",supplierName:\"\",buyerId:\"\",buyerName:\"\",operatorName:\"\",couponAmount:0,otherAmount:0,remark:\"\",goodsData:[],warehouseName:\"\",warehouseId:\"\",purchaseType:4},supplier_show:!1,purchase_list:[],purchase_rules:{warehouseName:[{required:!0,validator:t}],supplierName:[{required:!0,validator:e}],buyerId:[{required:!0,message:\"请选择采购人员\",trigger:\"change\"}]},goods_list:[],pusrchase_id:\"\",goods_index:0,warehouse_show:!1,staff_show:!1,options:[{value:1,label:\"按数量\"},{value:2,label:\"按金额\"}],options_value:\"\",contributions:\"\",apportionFlag:!1,merchantId:\"\",activeName:\"one\"}},computed:{...Object(p[\"c\"])({storeData:\"MUser/storeData\"}),purchaseAmount(){let t=0;return this.goods_list.length>1?this.goods_list.forEach(e=>{t=this.$NP.plus(t,Number(e.subtotalPrice))}):t=1===this.goods_list.length?Number(this.goods_list[0].subtotalPrice):0,this.$NP.plus(t,this.form.otherAmount)||0}},created(){3===this.systemType&&(this.merchantId=this.storeData.merchantData.id),this.look_path=this.$route.name,this.$route.params.id?(this.pusrchase_id=this.$route.params.id,this.getPurchaseInfoById()):(this.form.operatorName=this.userName,[2,3].includes(this.systemType)&&(this.form.shopId=this.storeData.id,this.form.shopName=this.storeData.name),this.getPauseSave());for(let t=1;t<=1;t++)this.goods_list.push(this.$_common.deepClone(f))},methods:{openWarehouse(){this.warehouse_show=!0},selWarehouse(t){this.form.warehouseName=t[0].warehouseName,this.form.warehouseId=t[0].id},staffSel(t){this.form.buyerName=t[0].staffName,this.form.buyerId=t[0].id},shopDefault(t,e){this.form.shopId=t,this.form.shopName=e.name},async updatePurchase(t){const e={auditStatus:\"2\",auditName:this.userName};this.$confirm(\"确定审核该订单\",\"提示\",{confirmButtonText:\"确定\",cancelButtonText:\"取消\",type:\"warning\"}).then(async()=>{await Object(d[\"updatePurchaseStatus\"])(this.pusrchase_id,e);this.$message({type:\"success\",message:\"操作成功!\"}),await this.getPurchaseInfoById()})},specCheckChange(t){let e=t.length;this.check_all_spec=e===this.spec_check_list.length,this.is_spec_indeterminate=e>0&&e<this.spec_check_list.length},checkAllSpecChange(t){this.spec_check=t?this.spec_check_list.map(t=>t.id):[],this.is_spec_indeterminate=!1},goodsVisibleChange(t,e){t&&(this.goods_index=e)},async getSkuNum(){const t=this.goods_list.map(t=>({skuId:t.skuId,goodsBasicId:t.basicGoodsId,num:t.buyerNum||1})).filter(t=>t.skuId);if(!t.length)return;const{data:e}=await Object(l[\"getMasterSkuNum\"])(t);this.goods_list=this.goods_list.map(t=>{let o={};return e[t.skuId]&&(o={title:e[t.skuId].title||\"\",buyerNum:e[t.skuId].num,skuValue:e[t.skuId].skuValue,skuNum:e[t.skuId].masterNum+e[t.skuId].masterName}),{...t,...o}}),this.err_tip_list=this.goods_list.filter(t=>!!t.title),this.goods_list.find(t=>!t.skuId)||this.addListGoods()},selGoods(t){let e=this.$_common.deepClone(this.goods_list);const o=t.map(t=>{let e=t.specGroup.map(t=>t.specValueName).join(\"_\");return{isEq:t.isEq,spec_check_list:[],basicGoodsId:t.id,goodsCode:t.code,goodsName:t.title,skuId:t.skuId,specGropName:e,unitName:t.unitName,categoryId:t.categoryId,categoryName:t.categoryName,buyerNum:1,buyerUnitPrice:.1,subtotalPrice:.1,couponAmount:0,otherAmount:0}}),a=e.some(t=>t.basicGoodsId);e=a?this.$_common.unique(e.concat(o),[\"basicGoodsId\",\"skuId\"]):o;const n=e.map(t=>t.skuId);this.pricePauseSave(n,e)},specSelConfirm(t){if(!t.goodsD[0].skuId)return void this.$message.warning(\"至少选择一项\");let e=this.$_common.deepClone(this.goods_list);const o=t.goodsD.map(e=>({basicGoodsId:t.now_goods_data.id,goodsCode:t.now_goods_data.code,goodsName:t.now_goods_data.title,skuId:e.skuId,specGropName:e.spec.specGropName,unitName:e.spec.unitName,categoryId:t.now_goods_data.categoryId,categoryName:t.now_goods_data.categoryTitle,buyerNum:1,buyerUnitPrice:.1,subtotalPrice:.1,couponAmount:0,otherAmount:0}));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.push(t)});const a=this.$_common.unique(e,[\"basicGoodsId\",\"skuId\"]),n=a.map(t=>t.skuId);this.pricePauseSave(n,a),this.spec_model=!1},async pricePauseSave(t,e){e=e.filter(t=>t.skuId);const{data:o}=await Object(h[\"getMoneyPauseSave\"])({skuIds:t});this.goods_list=e.map(t=>({...t,buyerUnitPrice:t.buyerUnitPrice>.1?t.buyerUnitPrice:o[t.skuId]||.1,subtotalPrice:t.subtotalPrice>.1?t.subtotalPrice:o[t.skuId]||.1})),await this.getSkuNum()},async addMoneyPauseSave(t){await Object(h[\"addMoneyPauseSave\"])({data:t})},addListGoods(){this.goods_list.push(this.$_common.deepClone(f))},editNumChange(t,e){const o=this.$_common.deepClone(this.goods_list);o[t].subtotalPrice=this.$NP.times(o[t].buyerNum||1,o[t].buyerUnitPrice),this.goods_list=o,o[t].skuId&&\"buyerNum\"===e&&this.getSkuNum()},otherSet(t,e){const o=this.$_common.deepClone(this.goods_list);o.forEach(t=>{t.basicGoodsId===e.basicGoodsId&&t.unitName===e.unitName&&(t.buyerNum=e.buyerNum,t.subtotalPrice=e.subtotalPrice,t.buyerUnitPrice=e.buyerUnitPrice)}),this.goods_list=o,this.getSkuNum()},async addPauseSave(){const t={...this.form,goodsData:this.goods_list};this.loading=!0;await Object(h[\"addPauseSave\"])({key:this.look_path,data:t});this.loading=!1,this.$message({type:\"success\",message:\"暂存成功\"}),2===this.systemType?this.$closeCurrentGoEdit(\"/SingleStore/purchase/purchaseList\"):this.$closeCurrentGoEdit(\"/Purchase/ManageP/PurchaseOrder\")},async getPauseSave(){const{data:t}=await Object(h[\"getPauseSave\"])({key:this.look_path});\"{}\"!==JSON.stringify(t)&&(this.form=t,this.goods_list=t.goodsData,await this.getSkuNum())},async getPurchaseInfoById(){const{data:t}=await Object(d[\"getPurchaseInfoById\"])(this.pusrchase_id);this.form.code=t.no,this.createTime=t.createTime,this.form.shopId=t.shopId,this.form.shopName=t.shopName,this.form.supplierId=t.supplierId,this.form.supplierName=t.supplierName,this.form.buyerId=t.buyerId,this.form.buyerName=t.buyerName,this.form.operatorName=t.operatorName,this.form.purchaseAmount=t.purchaseAmount,this.form.couponAmount=t.couponAmount,this.form.otherAmount=t.otherAmount,this.form.remark=t.remark,this.auditId=t.auditId,this.auditName=t.auditName,this.auditStatus=t.auditStatus,this.auditTime=t.auditTime,this.form.warehouseId=t.warehouseId,this.form.warehouseName=t.warehouseName,this.goods_list=t.details.map(t=>({...t,skuId:t.skuId,specGropName:t.skuName})),await this.getSkuNum()},async delPauseSave(t){Object(h[\"delPauseSave\"])({key:this.look_path});t&&(this.$message({type:\"success\",message:\"清除暂存成功\"}),this.$closeCurrentGoEdit(\"/Purchase/ManageP/PurchaseOrderAdd\"))},async addPurchaseOrder(){console.log(this.goods_list),this.form.couponAmount>this.purchaseAmount?this.$message.warning(\"优惠金额不能大于采购金额 \"):(this.form.otherAmount||(this.form.otherAmount=0),this.form.couponAmount||(this.form.couponAmount=0),this.$refs[\"form\"].validate(async t=>{if(t){const t=this.$_common.deepClone(this.goods_list).filter(t=>t.skuId>0);if(!t.length)return void this.$message.warning(\"请选择商品\");const e=t.every(t=>t.buyerNum>0);if(!e)return void this.$message.warning(\"采购数量必须大于0\");const o=t.every(t=>t.buyerUnitPrice>0);if(!o)return void this.$message.warning(\"采购单价必须大于0\");let a=t.map(t=>{let e={basicGoodsId:t.basicGoodsId,goodsCode:t.goodsCode,goodsName:t.goodsName,skuId:t.skuId,unitName:t.unitName,skuName:t.specGropName,buyerNum:t.buyerNum,buyerUnitPrice:t.buyerUnitPrice,subtotalPrice:t.subtotalPrice,couponAmount:t.couponAmount-0,otherAmount:t.otherAmount-0,categoryId:t.categoryId,categoryName:t.categoryName,otherNum:t.otherNum};return t.id&&(e.id=t.id),e});const n={...this.form,goodsData:a};if(this.goods_list.length>0){this.loading=!0;try{let t={};this.pusrchase_id?(n.deleteArray=this.del_goods_id,console.log(n),t=await Object(d[\"editPurchase\"])(this.pusrchase_id,n)):t=await Object(d[\"addPurchase\"])(n);this.loading=!1,this.$message({type:\"success\",message:\"提交成功\"}),await this.delPauseSave(),2===this.systemType?this.$closeCurrentGoEdit(\"/SingleStore/purchase/purchaseList\"):this.$closeCurrentGoEdit(\"/Purchase/ManageP/PurchaseOrder\")}finally{this.loading=!1}}else this.$message(\"请选择商品\");const r=a.map(t=>({skuId:t.skuId,money:t.buyerUnitPrice}));await this.addMoneyPauseSave(r)}}))},delData(t,e){e.id&&this.del_goods_id.push(e.id),1!==this.goods_list.length?this.goods_list.splice(t,1):this.$message.warning(\"必须保留一条\")},selShop(t,e){this.form.shopName=e[0].name},selUnitSupplier(t,e){this.form.supplierName=e[0].title},getSummaries(t){return this.$_common.getSummaries(t,[\"小计金额\",\"采购数量\"])},confirmContributions(){}}},g=m,b=(o(\"c785\"),o(\"6bc3\"),o(\"2877\")),_=Object(b[\"a\"])(g,a,n,!1,null,\"59f755aa\",null);e[\"default\"]=_.exports},\"1ccb\":function(t,e,o){\"use strict\";o(\"8d2f\")},\"478b\":function(t,e,o){\"use strict\";o.r(e),o.d(e,\"getWarehouseInfo\",(function(){return n})),o.d(e,\"getAllWarehouse\",(function(){return r})),o.d(e,\"enableWarehouse\",(function(){return s})),o.d(e,\"updateWarehouse\",(function(){return u})),o.d(e,\"deleteWarehouse\",(function(){return i})),o.d(e,\"addWarehouse\",(function(){return c})),o.d(e,\"addWarehouseBeginning\",(function(){return l})),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 g})),o.d(e,\"updateSaleOutStatus\",(function(){return b})),o.d(e,\"saveOutInventory\",(function(){return _})),o.d(e,\"statisticsAllSaleOut\",(function(){return k})),o.d(e,\"rejectInventory\",(function(){return y})),o.d(e,\"deleteDetailByInventoryInId\",(function(){return S})),o.d(e,\"searchAllPurchaseIn\",(function(){return I})),o.d(e,\"getPurchaseInInfo\",(function(){return v})),o.d(e,\"getPurchaseInInfoT\",(function(){return O})),o.d(e,\"getAllPurchaseIn\",(function(){return P})),o.d(e,\"exportsGetAllPurchaseIn\",(function(){return w})),o.d(e,\"updatePurchaseInStatus\",(function(){return A})),o.d(e,\"statisticsAllPurchaseIn\",(function(){return j})),o.d(e,\"getInventoryAll\",(function(){return N})),o.d(e,\"exportGetInventoryAll\",(function(){return C})),o.d(e,\"getInventoryDetailsAll\",(function(){return x})),o.d(e,\"exportGetInventoryDetailsAll\",(function(){return D})),o.d(e,\"searchAllInventoryDetails\",(function(){return $})),o.d(e,\"exportSearchAllInventoryDetails\",(function(){return G})),o.d(e,\"getAllBatch\",(function(){return L})),o.d(e,\"searchAllInventoryBatch\",(function(){return B})),o.d(e,\"getStocktakingInfo\",(function(){return R})),o.d(e,\"updateStocktaking\",(function(){return T})),o.d(e,\"auditStocktaking\",(function(){return z})),o.d(e,\"getAllStocktaking\",(function(){return W})),o.d(e,\"exportGetAllStocktaking\",(function(){return M})),o.d(e,\"searchAllStocktaking\",(function(){return E})),o.d(e,\"exportSearchAllStocktaking\",(function(){return U})),o.d(e,\"addStocktaking\",(function(){return V})),o.d(e,\"inventoryStatistics\",(function(){return q})),o.d(e,\"exportsInventoryStatistics\",(function(){return F})),o.d(e,\"searchInventoryStatistics\",(function(){return J})),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 at})),o.d(e,\"searchAllocate\",(function(){return nt})),o.d(e,\"getBatchByIds\",(function(){return rt})),o.d(e,\"getSkuNum\",(function(){return st})),o.d(e,\"getMasterSkuNum\",(function(){return ut})),o.d(e,\"addReservoir\",(function(){return it})),o.d(e,\"getReservoirInfo\",(function(){return ct})),o.d(e,\"getAllReservoir\",(function(){return lt})),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 gt})),o.d(e,\"getStorageLocationInfo\",(function(){return bt})),o.d(e,\"enableStorageLocation\",(function(){return _t})),o.d(e,\"updateStorageLocation\",(function(){return kt})),o.d(e,\"getAreaDateBySkuId\",(function(){return yt})),o.d(e,\"addReportLoss\",(function(){return St})),o.d(e,\"getAllReportLoss\",(function(){return It})),o.d(e,\"getReportLossInfo\",(function(){return vt})),o.d(e,\"auditReportLoss\",(function(){return Ot})),o.d(e,\"deleteReportLoss\",(function(){return Pt})),o.d(e,\"countPurchaseCost\",(function(){return wt})),o.d(e,\"exportgetInventoryByWarehouseId\",(function(){return At})),o.d(e,\"exportgetAllAllocate\",(function(){return jt})),o.d(e,\"getPickingInfo\",(function(){return Nt})),o.d(e,\"addPicking\",(function(){return Ct})),o.d(e,\"getAllPicking\",(function(){return xt})),o.d(e,\"getAllPickingGoodsDetail\",(function(){return Dt}));var a=o(\"b775\");function n(t,e){return Object(a[\"default\"])({url:\"/Stock/Warehouse/getWarehouseInfo/\"+t,method:\"get\",data:e})}function r(t){return Object(a[\"default\"])({url:\"/Stock/Warehouse/getAllWarehouse\",method:\"post\",data:t})}function s(t){return Object(a[\"default\"])({url:\"/Stock/Warehouse/enableWarehouse\",method:\"post\",data:t})}function u(t,e){return Object(a[\"default\"])({url:\"/Stock/Warehouse/updateWarehouse/\"+t,method:\"put\",data:e})}function i(t,e){return Object(a[\"default\"])({url:\"/Stock/Warehouse/deleteWarehouse/\"+t,method:\"delete\",data:e})}function c(t){return Object(a[\"default\"])({url:\"/Stock/Warehouse/addWarehouse\",method:\"post\",data:t})}function l(t){return Object(a[\"default\"])({url:\"/Stock/Warehouse/addWarehouseBeginning\",method:\"post\",data:t})}function d(t){return Object(a[\"default\"])({url:\"/Stock/InventoryOut/addLogistics\",method:\"post\",data:t})}function h(t){return Object(a[\"default\"])({url:\"/Stock/InventoryOut/getAllInventoryOut\",method:\"post\",data:t})}function p(t){return Object(a[\"default\"])({url:\"/Stock/InventoryOut/getAllInventoryOut\",method:\"post\",responseType:\"blob\",data:t})}function f(t,e){return Object(a[\"default\"])({url:\"/Stock/InventoryOut/getInventoryOutInfo/\"+t,method:\"get\",data:e})}function m(t){return Object(a[\"default\"])({url:\"/Stock/InventoryOut/getInventoryOutInfo\",method:\"post\",data:t})}function g(t){return Object(a[\"default\"])({url:\"/Stock/InventoryOut/searchAllInventoryOut\",method:\"post\",data:t})}function b(t){return Object(a[\"default\"])({url:\"/Stock/InventoryOut/updateInventoryOutStatus\",method:\"post\",data:t})}function _(t,e){return Object(a[\"default\"])({url:\"/Stock/InventoryOut/saveOutInventory/\"+t,method:\"put\",data:e})}function k(t){return Object(a[\"default\"])({url:\"/Stock/InventoryOut/statisticsAllInventoryOut\",method:\"post\",data:t})}function y(t){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/rejectInventory\",method:\"post\",data:t})}function S(t){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/deleteDetailByInventoryInId\",method:\"post\",data:t})}function I(t){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/searchAllInventoryIn\",method:\"post\",data:t})}function v(t,e){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/getInventoryInInfo/\"+t,method:\"put\",data:e})}function O(t){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/getInventoryInInfo\",method:\"put\",data:t})}function P(t){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/getAllInventoryIn\",method:\"post\",data:t})}function w(t){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/getAllInventoryIn\",method:\"post\",responseType:\"blob\",data:t})}function A(t){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/updateInventoryInStatus\",method:\"post\",data:t})}function j(t){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/statisticsAllInventoryIn\",method:\"post\",data:t})}function N(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/getInventoryAll\",method:\"post\",data:t})}function C(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/getInventoryAll\",responseType:\"blob\",method:\"post\",data:t})}function x(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/getInventoryDetailsAll\",method:\"post\",data:t})}function D(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/getInventoryDetailsAll\",responseType:\"blob\",method:\"post\",data:t})}function $(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/searchAllInventoryDetails\",method:\"post\",data:t})}function G(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/searchAllInventoryDetails\",responseType:\"blob\",method:\"post\",data:t})}function L(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/getAllBatch\",method:\"post\",data:t})}function B(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/searchAllInventoryBatch\",method:\"post\",data:t})}function R(t,e){return Object(a[\"default\"])({url:\"/Stock/Stocktaking/getStocktakingInfo/\"+t,method:\"get\",data:e})}function T(t,e){return Object(a[\"default\"])({url:\"/Stock/Stocktaking/updateStocktaking/\"+t,method:\"put\",data:e})}function z(t,e){return Object(a[\"default\"])({url:\"/Stock/Stocktaking/auditStocktaking/\"+t,method:\"put\",data:e})}function W(t){return Object(a[\"default\"])({url:\"/Stock/Stocktaking/getAllStocktaking\",method:\"post\",data:t})}function M(t){return Object(a[\"default\"])({url:\"/Stock/Stocktaking/getAllStocktaking\",responseType:\"blob\",method:\"post\",data:t})}function E(t){return Object(a[\"default\"])({url:\"/Stock/Stocktaking/searchAllStocktaking\",method:\"post\",data:t})}function U(t){return Object(a[\"default\"])({url:\"/Stock/Stocktaking/searchAllStocktaking\",method:\"post\",responseType:\"blob\",data:t})}function V(t){return Object(a[\"default\"])({url:\"/Stock/Stocktaking/addStocktaking\",method:\"post\",data:t})}function q(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/inventoryStatistics\",method:\"post\",data:t})}function F(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/inventoryStatistics\",method:\"post\",responseType:\"blob\",data:t})}function J(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/searchInventoryStatistics\",method:\"post\",data:t})}function H(t){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/getAllPurchaseIn\",method:\"post\",data:t})}function K(t){return Object(a[\"default\"])({url:\"/Stock/InventoryIn/getAllInventoryInByAudit\",method:\"post\",data:t})}function Q(t,e){return Object(a[\"default\"])({url:\"/Stock/Inventory/getWarehouseInventory/\"+t,method:\"get\",data:e})}function X(t){return Object(a[\"default\"])({url:\"/Stock/Allocate/addAllocate\",method:\"post\",data:t})}function Y(t){return Object(a[\"default\"])({url:\"/stock/Inventory/getInventoryByWarehouseId\",method:\"post\",data:t})}function Z(t){return Object(a[\"default\"])({url:\"/Stock/Allocate/getAllAllocate\",method:\"post\",data:t})}function tt(t,e){return Object(a[\"default\"])({url:\"/Stock/Allocate/deleteAllocate/\"+t,method:\"delete\",data:e})}function et(t,e){return Object(a[\"default\"])({url:\"/Stock/Allocate/getAllocateInfo/\"+t,method:\"get\",data:e})}function ot(t,e){return Object(a[\"default\"])({url:\"/Stock/Allocate/updateAllocate/\"+t,method:\"post\",data:e})}function at(t,e){return Object(a[\"default\"])({url:\"/Stock/Allocate/auditAllocate/\"+t,method:\"put\",data:e})}function nt(t){return Object(a[\"default\"])({url:\"/Stock/Allocate/searchAllocate\",method:\"post\",data:t})}function rt(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/getBatchByIds\",method:\"post\",data:t})}function st(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/getSkuNum\",method:\"post\",data:t})}function ut(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/getMasterSkuNum\",method:\"post\",data:t})}function it(t){return Object(a[\"default\"])({url:\"/Stock/ReservoirArea/addReservoir\",method:\"post\",data:t})}function ct(t,e){return Object(a[\"default\"])({url:\"/Stock/ReservoirArea/getReservoirInfo/\"+t,method:\"get\",data:e})}function lt(t){return Object(a[\"default\"])({url:\"/Stock/ReservoirArea/getAllReservoir\",method:\"post\",data:t})}function dt(t){return Object(a[\"default\"])({url:\"/Stock/ReservoirArea/getListReservoir\",method:\"post\",data:t})}function ht(t,e){return Object(a[\"default\"])({url:\"/Stock/ReservoirArea/enableReservoir/\"+t,method:\"put\",data:e})}function pt(t,e){return Object(a[\"default\"])({url:\"/Stock/ReservoirArea/updateReservoir/\"+t,method:\"put\",data:e})}function ft(t,e){return Object(a[\"default\"])({url:\"/Stock/ReservoirArea/deleteReservoir/\"+t,method:\"get\",data:e})}function mt(t){return Object(a[\"default\"])({url:\"/Stock/StorageLocation/getAllStorageLocation\",method:\"post\",data:t})}function gt(t){return Object(a[\"default\"])({url:\"/Stock/StorageLocation/addStorageLocation\",method:\"post\",data:t})}function bt(t,e){return Object(a[\"default\"])({url:\"/Stock/StorageLocation/getStorageLocationInfo/\"+t,method:\"post\",data:e})}function _t(t,e){return Object(a[\"default\"])({url:\"/Stock/StorageLocation/enableStorageLocation/\"+t,method:\"post\",data:e})}function kt(t,e){return Object(a[\"default\"])({url:\"/Stock/StorageLocation/updateStorageLocation/\"+t,method:\"post\",data:e})}function yt(t){return Object(a[\"default\"])({url:\"/Stock/Inventory/getAreaDateBySkuId\",method:\"post\",data:t})}function St(t){return Object(a[\"default\"])({url:\"/Stock/ReportLoss/addReportLoss\",method:\"post\",data:t})}function It(t){return Object(a[\"default\"])({url:\"/Stock/ReportLoss/getAllReportLoss\",method:\"post\",data:t})}function vt(t,e){return Object(a[\"default\"])({url:\"/Stock/ReportLoss/getReportLossInfo/\"+t,method:\"get\",data:e})}function Ot(t,e){return Object(a[\"default\"])({url:\"/Stock/ReportLoss/auditReportLoss/\"+t,method:\"put\",data:e})}function Pt(t,e){return Object(a[\"default\"])({url:\"/Stock/ReportLoss/deleteReportLoss/\"+t,method:\"delete\",data:e})}function wt(t){return Object(a[\"default\"])({url:\"Stock/InventoryIn/countPurchaseCost\",method:\"post\",data:t})}function At(t){return Object(a[\"default\"])({url:\"stock/Inventory/getInventoryByWarehouseId\",responseType:\"blob\",method:\"post\",data:t})}function jt(t){return Object(a[\"default\"])({url:\"Stock/Allocate/getAllAllocate\",responseType:\"blob\",method:\"post\",data:t})}function Nt(t,e){return Object(a[\"default\"])({url:\"Stock/Picking/getPickingInfo/\"+t,method:\"post\",data:e})}function Ct(t){return Object(a[\"default\"])({url:\"Stock/Picking/addPicking\",method:\"post\",data:t})}function xt(t){return Object(a[\"default\"])({url:\"Stock/Picking/getAllPicking\",method:\"post\",data:t})}function Dt(t){return Object(a[\"default\"])({url:\"Stock/Picking/getAllPickingGoodsDetail\",method:\"post\",data:t})}},\"4b63\":function(t,e,o){\"use strict\";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o(\"el-dialog\",{attrs:{title:\"选择仓库\",\"close-on-press-escape\":!1,\"close-on-click-modal\":!1,visible:t.isShow,width:\"70%\"},on:{close:t.cancel}},[o(\"el-table\",{directives:[{name:\"loading\",rawName:\"v-loading\",value:t.loading,expression:\"loading\"}],ref:\"warehouseTable\",attrs:{data:t.tableData,size:\"small\"},on:{\"row-dblclick\":t.dbSelect,\"selection-change\":t.selectionChange}},[t.isCheck?o(\"el-table-column\",{attrs:{type:\"selection\",width:\"55\",align:\"center\"}}):t._e(),o(\"el-table-column\",{attrs:{prop:\"warehouseCode\",\"show-overflow-tooltip\":\"\",\"min-width\":\"140\",label:\"仓库编码\"}}),o(\"el-table-column\",{attrs:{prop:\"warehouseName\",\"min-width\":\"130\",\"show-overflow-tooltip\":\"\",label:\"仓库名称\"}}),o(\"el-table-column\",{attrs:{prop:\"contactName\",label:\"联系人\",\"min-width\":\"100\"}}),o(\"el-table-column\",{attrs:{prop:\"contactMobile\",\"min-width\":\"100\",label:\"联系方式\"}}),o(\"el-table-column\",{attrs:{prop:\"address\",\"min-width\":\"160\",label:\"仓库地址\",\"show-overflow-tooltip\":\"\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[t._v(\" \"+t._s(e.row.contactAddress)+\" \")]}}])}),o(\"el-table-column\",{attrs:{prop:\"status\",label:\"状态\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[5===e.row.enableStatus?o(\"span\",{staticClass:\"success-status\"},[t._v(\" 启用 \")]):o(\"span\",{staticClass:\"danger-status\"},[t._v(\"禁用\")])]}}])}),o(\"el-table-column\",{attrs:{label:\"选择\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[o(\"el-button\",{attrs:{icon:\"el-icon-check\",size:\"mini\"},on:{click:function(o){return t.dbSelect(e.row)}}})]}}])})],1),o(\"FooterPage\",{attrs:{\"page-size\":t.pre_page,\"total-page\":t.total,\"current-page\":t.page},on:{\"update:totalPage\":function(e){t.total=e},\"update:total-page\":function(e){t.total=e},\"update:currentPage\":function(e){t.page=e},\"update:current-page\":function(e){t.page=e},pageChange:t.pageChange,sizeChange:t.sizeChange}},[t.isCheck?o(\"div\",{attrs:{slot:\"btn-div\"},slot:\"btn-div\"},[o(\"el-button\",{attrs:{size:\"small\",type:\"primary\"},on:{click:t.confirm}},[t._v(\"确定\")]),o(\"el-button\",{attrs:{size:\"small\"},on:{click:t.cancel}},[t._v(\"取消\")])],1):t._e()])],1)},n=[],r=o(\"3c48\"),s=o(\"478b\"),u={name:\"ClientListModal\",components:{FooterPage:r[\"default\"]},props:{isShow:{type:Boolean,default:!1},isCheck:{type:Boolean,default:!0},notId:{type:[Number,String],default:0}},data(){return{tableData:[],choose_data:[],searchForm:{},pre_page:10,page:1,total:0,loading:!1,pageLayout:\"total, prev, pager, next\"}},created(){this.getList()},methods:{async getList(){const{data:t,pageTotal:e}=await Object(s[\"getAllWarehouse\"])({page:this.page,pageSize:this.pre_page,notId:this.notId,enableStatus:5});this.tableData=t,this.total=e;for(let o=0;o<t.length;o++){const e=this.choose_data.find(e=>e.id===t[o].id);e&&this.$nextTick(()=>{this.$refs.warehouseTable.toggleRowSelection(t[o],!0)})}},searchClick(){this.page=1,this.getList()},selectionChange(t){this.choose_data.length?this.choose_data=this.$_common.unique(this.choose_data.concat(t),[\"id\"]):this.choose_data=t},confirm(){this.cancel(),this.$emit(\"confirm\",this.choose_data)},dbSelect(t){this.choose_data=[t],this.$emit(\"confirm\",this.choose_data),this.cancel()},cancel(){this.$emit(\"cancel\")},pageChange(t){this.page=t,this.getList()},sizeChange(t){this.pre_page=t,this.pageChange(1)}}},i=u,c=(o(\"01aa\"),o(\"2877\")),l=Object(c[\"a\"])(i,a,n,!1,null,\"9b04df50\",null);e[\"default\"]=l.exports},\"64f1\":function(t,e,o){\"use strict\";o.r(e),o.d(e,\"getStaff\",(function(){return n})),o.d(e,\"updateStaffStaff\",(function(){return r})),o.d(e,\"addStaff\",(function(){return s})),o.d(e,\"deleteStaff\",(function(){return u})),o.d(e,\"updateStaff\",(function(){return i})),o.d(e,\"getAllStaff\",(function(){return c})),o.d(e,\"getStaffInfo\",(function(){return l})),o.d(e,\"updateStaffTargetAndReward\",(function(){return d})),o.d(e,\"getAllStaffRewardDesc\",(function(){return h})),o.d(e,\"addDepartment\",(function(){return p})),o.d(e,\"deleteDepartment\",(function(){return f})),o.d(e,\"updateDepartment\",(function(){return m})),o.d(e,\"getAllDepartment\",(function(){return g})),o.d(e,\"getDepartmentInfo\",(function(){return b})),o.d(e,\"getAllRole\",(function(){return _})),o.d(e,\"getRoleInfo\",(function(){return k})),o.d(e,\"updateRole\",(function(){return y})),o.d(e,\"deleteRole\",(function(){return S})),o.d(e,\"addRole\",(function(){return I})),o.d(e,\"getAllStaffStaff\",(function(){return v}));var a=o(\"b775\");function n(t,e){return Object(a[\"default\"])({url:\"/Department/Staff/getStaffInfo/\"+t,method:\"post\",data:e})}function r(t,e){return Object(a[\"default\"])({url:\"/Department/Staff/updateStaff/\"+t,method:\"post\",data:e})}function s(t){return Object(a[\"default\"])({url:\"/Department/Staff/addStaff\",method:\"post\",data:t})}function u(t){return Object(a[\"default\"])({url:\"/Department/Staff/deleteStaff\",method:\"post\",data:t})}function i(t,e){return Object(a[\"default\"])({url:\"/Department/Staff/updateStaff/\"+t,method:\"put\",data:e})}function c(t){return Object(a[\"default\"])({url:\"/Department/Staff/getAllStaff\",method:\"post\",data:t})}function l(t,e){return Object(a[\"default\"])({url:\"/Department/Staff/getStaffInfo/\"+t,method:\"get\",data:e})}function d(t,e){return Object(a[\"default\"])({url:\"/Department/Staff/updateStaffTargetAndReward/\"+t,method:\"post\",data:e})}function h(t){return Object(a[\"default\"])({url:\"/Department/Staff/getAllStaffRewardDesc\",method:\"post\",data:t})}function p(t){return Object(a[\"default\"])({url:\"/Department/Department/addDepartment\",method:\"post\",data:t})}function f(t,e){return Object(a[\"default\"])({url:\"/Department/Department/deleteDepartment/\"+t,method:\"delete\",data:e})}function m(t,e){return Object(a[\"default\"])({url:\"/Department/Department/updateDepartment/\"+t,method:\"put\",data:e})}function g(t){return Object(a[\"default\"])({url:\"/Department/Department/getAllDepartment\",method:\"post\",data:t})}function b(t,e){return Object(a[\"default\"])({url:\"/Department/Department/getDepartmentInfo/\"+t,method:\"get\",data:e})}function _(t){return Object(a[\"default\"])({url:\"/Department/Role/getAllRole\",method:\"post\",data:t})}function k(t,e){return Object(a[\"default\"])({url:\"/Department/Role/getRoleInfo/\"+t,method:\"get\",data:e})}function y(t,e){return Object(a[\"default\"])({url:\"/Department/Role/updateRole/\"+t,method:\"put\",data:e})}function S(t,e){return Object(a[\"default\"])({url:\"/Department/Role/deleteRole/\"+t,method:\"delete\",data:e})}function I(t){return Object(a[\"default\"])({url:\"/Department/Role/addRole\",method:\"post\",data:t})}function v(t){return Object(a[\"default\"])({url:\"/Department/Staff/getAllStaff\",method:\"post\",data:t})}},\"6bc3\":function(t,e,o){\"use strict\";o(\"d637\")},7549:function(t,e,o){\"use strict\";o(\"12b4\")},\"8d2f\":function(t,e,o){},\"8f9e\":function(t,e,o){},b314:function(t,e,o){\"use strict\";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o(\"div\",{staticClass:\"dis-inline\"},[o(\"el-select\",{style:{width:t.width+\"px\"},attrs:{value:t.value,placeholder:t.placeholder,clearable:t.clearable,filterable:\"\",remote:\"\",size:t.size,multiple:t.multiple,disabled:t.disabled,\"remote-method\":t.remoteMethod,loading:t.loading},on:{change:t.selChange,clear:t.clearChange}},t._l(t.supplier_list,(function(t,e){return o(\"el-option\",{key:e,attrs:{label:t.title,value:t.id}})})),1),o(\"span\",{staticClass:\"sel-btn\",staticStyle:{\"margin-right\":\"15px\"},on:{click:t.openVisible}},[o(\"i\",{staticClass:\"el-icon-search\"})]),o(\"el-dialog\",{attrs:{title:\"供应商列表\",visible:t.supplier_show,width:\"60%\",modal:t.modal,\"close-on-press-escape\":!1,\"close-on-click-modal\":!1},on:{close:t.visibleCancel}},[o(\"div\",{staticClass:\"search-wrp clearfix\"},[o(\"el-input\",{staticStyle:{width:\"260px\"},attrs:{size:\"small\",clearable:\"\",placeholder:\"供应商名称\"},on:{clear:function(e){return t.pageChange(1)}},nativeOn:{keyup:function(e){return!e.type.indexOf(\"key\")&&t._k(e.keyCode,\"enter\",13,e.key,\"Enter\")?null:t.pageChange(1)}},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:\"keyword\"}},[o(\"el-button\",{attrs:{slot:\"append\",type:\"primary\",icon:\"el-icon-search\"},on:{click:function(e){return t.pageChange(1)}},slot:\"append\"})],1)],1),o(\"el-table\",{attrs:{data:t.supplier_list,size:\"small\"},on:{\"row-dblclick\":t.dbSelect,\"selection-change\":t.customerSel}},[o(\"el-table-column\",{attrs:{prop:\"title\",label:\"供应商名称\"}}),o(\"el-table-column\",{attrs:{prop:\"realName\",label:\"联系人\",align:\"center\"}}),o(\"el-table-column\",{attrs:{prop:\"mobile\",label:\"联系电话\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[t._v(\" \"+t._s(e.row.mobile)+\" \")]}}])}),o(\"el-table-column\",{attrs:{label:\"选择\",align:\"center\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[o(\"el-button\",{attrs:{icon:\"el-icon-check\",size:\"mini\"},on:{click:function(o){return t.dbSelect(e.row)}}})]}}])})],1),o(\"FooterPage\",{attrs:{layout:\"prev, pager, next, jumper\",\"page-size\":t.pre_page,\"total-page\":t.total,\"current-page\":t.page},on:{\"update:totalPage\":function(e){t.total=e},\"update:total-page\":function(e){t.total=e},\"update:currentPage\":function(e){t.page=e},\"update:current-page\":function(e){t.page=e},pageChange:t.pageChange,sizeChange:t.sizeChange}})],1)],1)},n=[],r=o(\"1244\"),s={name:\"SelectSupplier\",components:{},model:{prop:\"value\",event:\"change\"},props:{value:{type:[Number,String,Array],default:\"\"},placeholder:{type:String,default:\"供应商名称\"},size:{type:String,default:\"\"},width:{type:[String,Number],default:\"150\"},isDefault:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},isCheck:{type:Boolean,default:!0},enable:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},data(){return{supplier_list:[],supplier_show:!1,loading:!1,total:0,page:1,pre_page:10,keyword:\"\"}},created(){this.getList()},methods:{remoteMethod(t){this.loading=!0,this.pre_page=999,this.keyword=t,this.getList()},clearChange(){this.$emit(\"clear\")},selChange(t){if(!t)return;let e=[];e=this.multiple?this.supplier_list.filter(e=>t.indexOf(e.id)>-1):this.supplier_list.filter(e=>e.id===t),this.$emit(\"change\",t,e)},async getList(){const t={page:this.page,pageSize:this.pre_page,enableStatus:5,keyword:this.keyword},e=await Object(r[\"getAllSupplier\"])(t);this.loading=!1,this.supplier_list=e.data,this.total=e.pageTotal,this.$emit(\"getAllSupplier\",e.data),this.isDefault&&this.$emit(\"default\",e.data[0].id,e.data[0])},dbSelect(t){this.selChange(t.id),this.visibleCancel()},customerSel(t){this.selChange(t[0].id),this.visibleCancel()},pageChange(t){this.page=t,this.getList()},sizeChange(t){this.pre_page=t,this.pageChange(1)},visibleCancel(){this.supplier_show=!1},openVisible(){this.keyword=\"\",this.supplier_show=!0,this.sizeChange(10)}}},u=s,i=(o(\"7549\"),o(\"2877\")),c=Object(i[\"a\"])(u,a,n,!1,null,\"fe7d45a4\",null);e[\"default\"]=c.exports},b53c:function(t,e,o){\"use strict\";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o(\"div\",[o(\"el-cascader\",{style:{width:t.width+\"px\"},attrs:{disabled:t.disabled,clearable:t.clearable,filterable:t.filterable,placeholder:t.placeholder,value:t.value,options:t.Department_data,props:t.props,size:t.size},on:{\"expand-change\":t.expandChange,change:t.change},scopedSlots:t._u([{key:\"default\",fn:function(e){return o(\"div\",{on:{click:t.clickChange}},[t._v(\" \"+t._s(e.data.departmentName)+\" \")])}}])}),t.isShowAdd?o(\"el-button\",{attrs:{type:\"text\",size:\"mini\"},on:{click:t.getAllDepartment}},[t._v(\" 【刷新】 \")]):t._e()],1)},n=[],r=o(\"64f1\"),s={name:\"DepartmentSel\",model:{prop:\"value\",event:\"change\"},props:{value:{type:Array,default:()=>[]},isShowAdd:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:\"请选择部门\"},clearable:{type:Boolean,default:!1},filterable:{type:Boolean,default:!1},width:{type:[Number,String],default:200},size:{type:String,default:\"small\"}},data(){return{Department_data:[],props:{label:\"departmentName\",value:\"id\",checkStrictly:!0}}},created(){this.getAllDepartment()},methods:{async getAllDepartment(){const t=await Object(r[\"getAllDepartment\"])();this.Department_data=t.data},change(t){this.$emit(\"change\",t)},expandChange(t){this.$emit(\"expandChange\",t)}}},u=s,i=o(\"2877\"),c=Object(i[\"a\"])(u,a,n,!1,null,\"0457a42c\",null);e[\"default\"]=c.exports},c785:function(t,e,o){\"use strict\";o(\"13fe\")},d177:function(t,e,o){\"use strict\";o.r(e);var a=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,a){return o(\"div\",{key:a,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,a)}},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,a)}},model:{value:e.spec_check,callback:function(o){t.$set(e,\"spec_check\",o)},expression:\"item.spec_check\"}},t._l(e.children,(function(e,a){return o(\"el-checkbox\",{key:a,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)},n=[],r=o(\"c40e\"),s=o(\"0d53\"),u={name:\"ConditionSelGoods\",components:{SaleGoodsSel:s[\"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(r[\"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(r[\"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(r[\"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 a=this.spec_check_list[o];const n=a.children&&a.children.length?a.children.find(e=>e.id===t):\"\";if(n){e=n;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 a=t.length;o[e].check_unit_spec=a===o[e].children.length,o[e].is_spec_indeterminate=a>0&&a<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=u,c=(o(\"1ccb\"),o(\"2877\")),l=Object(c[\"a\"])(i,a,n,!1,null,\"410451b4\",null);e[\"default\"]=l.exports},d637:function(t,e,o){}}]);","extractedComments":[]}
|