6.8ef0b9d69b44cb1aae7f.js 28 KB

1
  1. webpackJsonp([6],{Owwo:function(e,t,o){(e.exports=o("FZ+f")(!1)).push([e.i,'\n@charset "UTF-8";\n/** 底部步骤 */\n.footer[data-v-d123e04c] {\n width: 100%;\n padding: 10px;\n bottom: 0px;\n text-align: center;\n z-index: 999;\n}\n.mx[data-v-d123e04c] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n.mx .button[data-v-d123e04c] {\n margin-left: 10px;\n}\n.change-form[data-v-d123e04c] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n min-width: 900px;\n}\n.change-form .change-form-item[data-v-d123e04c] {\n width: 30%;\n margin: 0 10px 20px 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n.change-form[data-v-d123e04c] .el-form-item__content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 100%;\n}\n.change-form[data-v-d123e04c] .el-date-editor,\n .change-form[data-v-d123e04c] .el-cascader,\n .change-form[data-v-d123e04c] .el-select {\n width: 100%;\n}\n.bg-in-stock[data-v-d123e04c] {\n background-color: #fff;\n margin: 10px;\n padding: 25px;\n}\n.goods-info[data-v-d123e04c] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.goods-info .goods-name-box[data-v-d123e04c] {\n text-align: left;\n}\n.goods-info .goods-name-box .goods-name[data-v-d123e04c] {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n line-height: 16px;\n}\n.goods-info .goods-name-box .specs[data-v-d123e04c] {\n color: #999999;\n}\n.sn-code-container[data-v-d123e04c] {\n max-height: 100px;\n /* 设置最大高度,超过这个高度将显示滚动条 */\n overflow-y: auto;\n /* 垂直方向上溢出时显示滚动条 */\n}\n[data-v-d123e04c] .el-input--suffix .el-input__inner {\n padding-right: 10px;\n}\n[data-v-d123e04c] .error-input .el-input__inner {\n border: 1px solid red;\n}\n',""])},b4j6:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o("Xxa5"),s=o.n(n),a=o("exGp"),r=o.n(a),i=o("Dd8w"),d=o.n(i),c=o("NYxO"),l=(o("jQQ7"),o("dO7o")),u=o("hky6"),h=o("dClm"),p=o("CIZm"),_=o("Pfph"),m=o("FWz8"),g=o("qsHl"),f=o("aANz"),x={name:"goodsExchangeAdd",data:function(){return{params:{page_no:1,page_size:10},typeList:[],adminList:[],dialogVisible:!1,warehouseList:[],deptList:[],deptListAll:[],orderList:[],id:"",type:"",goodsExchangeAddForm:{contract_product_list:[],product_list:[]},goodsExchangeAddFormRule:{warehouse_id:[{required:!0,message:"请选择入库仓库",trigger:"change"}],type:[{required:!0,message:"请选择入库类型",trigger:"change"}]},warehouseProduct:null,scanDialogVisible:!1,scanGoodsForm:{},routeName:"",sttorageType:"",goodsVisible:!1,goodsData:[],goodsList:[],orderVisible:!1,deliveryTypeList:[{code:"express",name:"快递配送"},{code:"self_pick",name:"门店自提"}],snCodeVisible:!1,sn_code:"",sku:"",sn_code_list:[],index:"",snMultipleSelection:"",orderType:!1}},mounted:function(){var e=this;this.$nextTick(function(){e.$refs.order.focus()}),this.routeName=this.$route.name,this.sttorageType=this.$route.params.type,this.GET_WarehouseList(),this.GET_DeptList()},watch:{$route:{immediate:!0,handler:function(e){"goodsExchangeEdit"===this.$route.name?this.type="edit":"goodsExchangeAudit"===this.$route.name?this.type="audit":"goodsExchangeReturn"===this.$route.name?this.type="return":"goodsExchangeAdd"===this.$route.name?(this.type="add",this.goodsExchangeAddForm={change_amount:0,change_list:[],return_list:[],product_list:[],handled_by_id:this.user.uid,dept_id:this.user.dept_id},this.GET_WarehouseList({dept_id:this.user.dept_id}),this.$set(this.goodsExchangeAddForm,"change_time",(new Date).getTime())):"goodsExchangeDetail"===this.$route.name&&(this.type="detail"),this.$route.params.id&&(this.id=this.$route.params.id,this.GET_goodsExchangeAddDetail()),this.GET_AdministratorList()}}},computed:d()({},Object(c.b)(["user"])),methods:{handleSelOrderChange:function(e){if(e.length>1){var t=e[e.length-1];this.$refs.tables.clearSelection(),this.$refs.tables.toggleRowSelection(t,!0)}this.snMultipleSelection=e},toBack:function(){this.$router.push({name:"goodsExchange",params:{type:"second"}})},closeSncode:function(){this.sn_code="",this.snCodeVisible=!1},toSnCode:function(){var e=this;l.l("in",this.sku,this.sn_code.replace(/\s+/g,"")).then(function(t){e.sn_code="",e.goodsExchangeAddForm.product_list[e.index].sn_code_list.find(function(e){return e.sn_code===t.sn_code&&e.sku===t.sku})||e.goodsExchangeAddForm.product_list[e.index].sn_code_list.push(t),e.goodsExchangeAddForm.product_list[e.index].num=e.goodsExchangeAddForm.product_list[e.index].sn_code_list.length,e.scanGoodsForm.bar_code="",e.$nextTick(function(){e.$refs.input.focus()})})},addSnCode:function(e,t){this.sku=e.product_vo.sku,this.index=t,this.snCodeVisible=!0},orderBtn:function(){var e=this;m.i(this.params).then(function(t){e.orderList=t,e.orderVisible=!0})},closeOrder:function(){this.orderVisible=!1},goodsPageSizeChange:function(e){var t=this;this.params.page_size=e,l.g(this.params,this.goodsExchangeAddForm.warehouse_id).then(function(e){t.goodsData=e})},goodsPageCurrentChange:function(e){var t=this;this.params.page_no=e,l.g(this.params,this.goodsExchangeAddForm.warehouse_id).then(function(e){t.goodsData=e})},handlePageSizeChange:function(e){var t=this;this.params.page_size=e,m.i(this.params).then(function(e){t.orderList=e})},handlePageCurrentChange:function(e){var t=this;this.params.page_no=e,m.i(this.params).then(function(e){t.orderList=e})},memberType:function(e){var t="";h.h(this.params).then(function(o){return o.data.map(function(o){if(o.id==e)return t=o.name}),t})},warehouseName:function(e){var t="";return this.warehouseList.map(function(o){if(o.id==e)return t=o.name}),t},deliveryType:function(e){var t="";return this.deliveryTypeList.map(function(o){if(o.code==e)return t=o.name}),t},payType:function(e){var t="";f.d({page_no:1,page_size:-1,enable_flag:!0}).then(function(o){return o.data.map(function(o){if(o.id==e)return t=o.name}),t})},typeName:function(e){var t="";this.$nextTick(function(){u.u({dictType:"order_status"}).then(function(o){o.data.map(function(o){if(o.value==e)return t=o.label,console.log(t),t})})})},blurCode:function(){var e=this;void 0===this.scanGoodsForm.bar_code&&void 0===this.scanGoodsForm.sn_code||g.f({barcode:this.scanGoodsForm.bar_code,sncode:this.scanGoodsForm.sn_code}).then(function(t){console.log(t),e.goodsExchangeAddForm.contract_product_list=t.data})},searchOrderAdd:function(){var e=this;this.snMultipleSelection.length>=1?l.j(this.snMultipleSelection[0].sn).then(function(t){e.orderType=!0,"saleAfter"==t.scan_order_type?e.goodsExchangeAddForm.type="SALE_AFTER":e.goodsExchangeAddForm.type="HAIL_ENTRY",e.goodsExchangeAddForm.warehouse_id=t.return_warehouse_id,e.goodsExchangeAddForm.scan_order_sn=e.snMultipleSelection[0].sn,e.goodsExchangeAddForm.scan_order_type=t.type,e.goodsExchangeAddForm.order_id=t.id,t.item_list.map(function(e){e.scan_order_item_id=e.id,e.scan_order_id=t.id,"saleAfter"==t.scan_order_type?(e.num=e.return_num,e.order_num=e.order_item_num):(e.order_num=e.num,e.num=0),e.sn_code_list=[]}),e.goodsExchangeAddForm.product_list=t.item_list,e.orderVisible=!1}):this.$message.error("请选择订单")},blurUsername:function(){var e=this;void 0!==this.goodsExchangeAddForm.sn?l.j(this.goodsExchangeAddForm.sn).then(function(t){e.orderType=!0,"saleAfter"==t.scan_order_type?e.goodsExchangeAddForm.type="SALE_AFTER":e.goodsExchangeAddForm.type="HAIL_ENTRY",e.goodsExchangeAddForm.warehouse_id=t.return_warehouse_id,e.goodsExchangeAddForm.scan_order_sn=e.goodsExchangeAddForm.sn,e.goodsExchangeAddForm.scan_order_type=t.type,e.goodsExchangeAddForm.order_id=t.id,t.item_list.map(function(e){e.scan_order_item_id=e.id,e.scan_order_id=t.id,"saleAfter"==t.scan_order_type?(e.order_num=e.num,e.num=e.return_num):(e.order_num=e.num,e.num=0),e.sn_code_list=[]}),e.goodsExchangeAddForm.product_list=t.item_list}):this.$message.error("请填写订单编号")},handleSelectionChange:function(e){this.goodsList=e.map(function(e){return e.product_id=e.id,e.goods_id=e.id,e.sn_code_list=[],e})},submitGoosData:function(){this.goodsList.length>=1?(this.goodsExchangeAddForm.product_list=this.goodsList,console.log(this.goodsList),this.goodsVisible=!1):this.$message.error("请选择商品信息")},closeGoosData:function(){this.goodsVisible=!1},printIng:function(){},toSearch:function(){var e=this;l.k(this.goodsExchangeAddForm.warehouse_id,this.scanGoodsForm.bar_code.replace(/\s+/g,"")).then(function(t){t.sn_code_list=[],e.sku=t.product_vo.sku;var o=e.goodsExchangeAddForm.product_list.findIndex(function(e){return console.log("Comparing with:",e),e.goods_id===t.goods_id&&e.product_id===t.product_id&&e.warehouse_id===t.warehouse_id&&e.product_vo.sku===t.product_vo.sku});-1===o?(e.index=e.goodsExchangeAddForm.product_list.length,e.goodsExchangeAddForm.product_list.push(t)):e.index=o,t.product_vo.have_sn&&e.$nextTick(function(){e.$refs.sn_input.focus()})})},scanCode:function(){var e=this;this.goodsExchangeAddForm.warehouse_id?(this.scanDialogVisible=!0,this.$nextTick(function(){e.$refs.input.focus()})):this.$message.error("请先选择仓库!")},GET_AdministratorList:function(){var e=this;_.h({page_no:1,page_size:9999,user_state:0}).then(function(t){e.adminList=t.data})},cleanGoodsList:function(){this.goodsExchangeAddForm.contract_product_list=[],this.goodsExchangeAddForm.product_list=[]},changewarehouseList:function(e){this.$set(this.goodsExchangeAddForm,"warehouse_id",""),this.GET_WarehouseList({dept_id:e}),this.cleanGoodsList()},handlePassGoodsExchange:function(){var e=this;!1===this.goodsExchangeAddForm.check_amount_same?this.$confirm(this.goodsExchangeAddForm.diff_amount_message,"提示",{type:"warning"}).then(function(){e.$confirm("确定通过吗?","提示",{type:"warning"}).then(function(){l.a(e.id,{status:"PASS"}).then(function(){e.$message.success("已通过!");var t=e.$route.params.callback;"function"==typeof t&&t(),e.$store.dispatch("delCurrentViews",{view:e.$route,$router:e.$router}),e.$router.push({name:"goodsExchange"})})}).catch(function(){})}).catch(function(){}):this.$confirm("确定通过吗?","提示",{type:"warning"}).then(function(){l.a(e.id,{status:"PASS"}).then(function(){e.$message.success("已通过!");var t=e.$route.params.callback;"function"==typeof t&&t(),e.$store.dispatch("delCurrentViews",{view:e.$route,$router:e.$router}),e.$router.push({name:"goodsExchange"})})}).catch(function(){})},handleRejectGoodsExchange:function(){var e=this;this.$confirm("确定拒绝吗?","提示",{type:"warning"}).then(function(){l.a(e.id,{status:"REJECT",reject_reason:e.goodsExchangeAddForm.reject_reason}).then(function(){e.$message.success("已拒绝!"),e.dialogVisible=!1;var t=e.$route.params.callback;"function"==typeof t&&t(),e.$store.dispatch("delCurrentViews",{view:e.$route,$router:e.$router}),e.$router.push({name:"goodsExchange"})})}).catch(function(){})},GET_WarehouseList:function(e){var t=this;h.E().then(function(e){t.warehouseList=e}),u.u({dictType:"warehouse_entry_type"}).then(function(e){t.typeList=e.data})},savegoodsExchangeAddForm:function(){var e=this;this.$refs.goodsExchangeAddForm.validate(function(t){if(t){var o=e.goodsExchangeAddForm.id,n=e.MixinClone(e.goodsExchangeAddForm);if(n.handled_by=e.deptListAll,m.i({sn:e.goodsExchangeAddForm.sn}).then(function(e){n.order_id=Number(e.data[0].id)}),n.staff_name=e.goodsExchangeAddForm.distribution_name,n.warehouse_id&&(n.warehouse_name=e.warehouseList.find(function(e){return e.id===n.warehouse_id}).name),n.handled_by_id&&(n.handled_by=e.adminList.find(function(e){return e.id===n.handled_by_id}).real_name),n.change_time=Math.floor(n.change_time/1e3),n.save_or_submit="save",!n.product_list.length)return void e.$message.error("请选择商品!");n.product_list.map(function(e){e.product_stock_id=e.id,e.product_id=e.product_vo.id,e.id="",e.order_num||(e.scan_diff_num=e.order_num-e.num)}),"editInventory"===e.$route.name?l.d(o,n).then(function(t){e.$message.success("修改成功!");var o=e.$route.params.callback;"function"==typeof o&&o(),e.$store.dispatch("delCurrentViews",{view:e.$route,$router:e.$router}),e.$router.push({name:"goodsExchange",params:{type:"second"}})}):"addInventory"===e.$route.name&&l.p(n).then(function(){e.$message.success("添加成功!");var t=e.$route.params.callback;"function"==typeof t&&t(),e.$store.dispatch("delCurrentViews",{view:e.$route,$router:e.$router}),e.$router.push({name:"goodsExchange",params:{type:"second"}})})}})},submitgoodsExchangeAddForm:function(){var e=this;this.$refs.goodsExchangeAddForm.validate(function(t){if(t){var o=e.goodsExchangeAddForm.id,n=e.MixinClone(e.goodsExchangeAddForm);if(n.handled_by=e.deptListAll,m.i({sn:e.goodsExchangeAddForm.sn}).then(function(e){console.log(e.data),n.order_id=Number(e.data[0].id)}),n.staff_name=e.goodsExchangeAddForm.distribution_name,n.warehouse_id&&(n.warehouse_name=e.warehouseList.find(function(e){return e.id===n.warehouse_id}).name),n.handled_by_id&&(n.handled_by=e.adminList.find(function(e){return e.id===n.handled_by_id}).real_name),n.change_time=Math.floor(n.change_time/1e3),n.save_or_submit="submit",!n.product_list.length)return void e.$message.error("请选择商品!");n.product_list.map(function(e){e.product_stock_id=e.id,e.product_id=e.product_vo.id,e.id=""}),"editInventory"===e.$route.name?l.d(o,n).then(function(t){e.$message.success("修改成功!");var o=e.$route.params.callback;"function"==typeof o&&o(),e.$store.dispatch("delCurrentViews",{view:e.$route,$router:e.$router}),e.$router.push({name:"goodsExchange",params:{type:"second"}})}):"addInventory"===e.$route.name&&l.p(n).then(function(){e.$message.success("添加成功!");var t=e.$route.params.callback;"function"==typeof t&&t(),e.$store.dispatch("delCurrentViews",{view:e.$route,$router:e.$router}),e.$router.push({name:"goodsExchange",params:{type:"second"}})})}})},handleSelectWarehouseEntryBatch:function(){var e=this;return r()(s.a.mark(function t(){return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.goodsExchangeAddForm.warehouse_id){t.next=3;break}return e.$message.error("请先选择仓库!"),t.abrupt("return");case 3:l.g(e.params,e.goodsExchangeAddForm.warehouse_id).then(function(t){var o={};t.records.map(function(e){return o.sn=e.goods_vo.sn,o.name=e.goods_vo.name,o}),e.goodsData=t,e.goodsVisible=!0});case 4:case"end":return t.stop()}},t,e)}))()},handleSelectOrderSn:function(){var e=this;return r()(s.a.mark(function t(){var o,n;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$EnPickerOrder({orderApi:"admin/erp/order",selectedIds:[e.goodsExchangeAddForm.order_sn],limit:1});case 2:o=t.sent,e.$set(e.goodsExchangeAddForm,"distribution_name",o[0].distribution_name),n=o.map(function(e){return e.sn}),e.$set(e.goodsExchangeAddForm,"order_sn",n.join(",")),e.GET_WarehouseOutProduct();case 7:case"end":return t.stop()}},t,e)}))()},GET_WarehouseOutProduct:function(){var e=this;return r()(s.a.mark(function t(){var o;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.a({order_sn:e.goodsExchangeAddForm.order_sn});case 2:o=t.sent,e.goodsExchangeAddForm.return_list=o.data.map(function(e){return e.amount=e.product_price,e.product_sn=e.product_sn,e.product_name=e.product_name,e.specification=e.product_specification,e.product_id=e.product_id,e.unit=e.product_unit,e.num=e.return_num,e.stock_sn=e.warehouse_entry_sn,e.cost_price=e.product_cost_price,e});case 4:case"end":return t.stop()}},t,e)}))()},GET_DeptList:function(){var e=this;l.i().then(function(t){e.deptListAll=t,e.deptListAll.password=""})},handleChangeWareHouse:function(e){},GET_goodsExchangeAddDetail:function(){var e=this;this.$nextTick(function(){l.f(e.id).then(function(t){e.goodsExchangeAddForm=t,e.GET_WarehouseList({dept_id:t.dept_id}),e.goodsExchangeAddForm.change_time=Math.floor(1e3*e.goodsExchangeAddForm.change_time),t.product_list.map(function(e){e.return_num=e.num,e.sn_code_list||(e.sn_code_list=[])}),e.goodsExchangeAddForm.distribution_name=t.staff_name,e.goodsExchangeAddForm.product_list=t.product_list})})}}},v=o("XyMi");var b=function(e){o("h7CI")},y=Object(v.a)(x,function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"bg-in-stock"},[o("el-form",{ref:"goodsExchangeAddForm",staticClass:"change-form",attrs:{model:e.goodsExchangeAddForm,rules:e.goodsExchangeAddFormRule,"label-width":"160px",inline:""}},[o("el-form-item",{staticClass:"change-form-item",attrs:{label:"订单",prop:"order_id"}},[o("span",[o("el-input",{ref:"order",nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.blurUsername()}},model:{value:e.goodsExchangeAddForm.sn,callback:function(t){e.$set(e.goodsExchangeAddForm,"sn",t)},expression:"goodsExchangeAddForm.sn"}}),e._v(" "),o("el-button",{on:{click:function(t){return e.blurUsername()}}},[e._v("搜索")]),e._v(" "),o("el-button",{on:{click:e.orderBtn}},[e._v("订单列表")])],1)]),e._v(" "),o("el-form-item",{staticClass:"change-form-item",attrs:{prop:"warehouse_id",label:"入库仓库"}},[o("el-select",{attrs:{clearable:"",disabled:"detail"===e.type||"audit"===e.type},model:{value:e.goodsExchangeAddForm.warehouse_id,callback:function(t){e.$set(e.goodsExchangeAddForm,"warehouse_id",t)},expression:"goodsExchangeAddForm.warehouse_id"}},e._l(e.warehouseList,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),o("el-form-item",{staticClass:"change-form-item",attrs:{label:"类型",prop:"type"}},[o("el-select",{attrs:{filterable:"","allow-create":"",clearable:"","default-first-option":"",disabled:"detail"===e.type||"audit"===e.type||e.orderType||"SALE_AFTER"==e.goodsExchangeAddForm.type||"HAIL_ENTRY"==e.goodsExchangeAddForm.type},model:{value:e.goodsExchangeAddForm.type,callback:function(t){e.$set(e.goodsExchangeAddForm,"type",t)},expression:"goodsExchangeAddForm.type"}},e._l(e.typeList,function(e){return o("el-option",{key:e.id,attrs:{label:e.label,value:e.value,disabled:"TRANSFER_ENTRY"==e.value||"HAIL_ENTRY"==e.value||"SALE_AFTER"==e.value}})}),1)],1),e._v(" "),o("el-form-item",{staticClass:"change-form-item",staticStyle:{width:"61%"},attrs:{label:"备注",prop:"change_desc"}},[o("el-input",{staticStyle:{flex:"1"},attrs:{type:"textarea",disabled:"detail"===e.type||"audit"===e.type,autosize:{minRows:3,maxRows:4},placeholder:"请输入"},model:{value:e.goodsExchangeAddForm.memo,callback:function(t){e.$set(e.goodsExchangeAddForm,"memo",t)},expression:"goodsExchangeAddForm.memo"}})],1),e._v(" "),o("div",{staticClass:"mx"},[o("h3",[e._v("商品明细")]),e._v(" "),"detail"!==e.type&&"audit"!==e.type?o("el-button",{staticClass:"button",attrs:{size:"mini",type:"primary"},on:{click:e.scanCode}},[e._v("扫码入库")]):e._e(),e._v(" "),"detail"!==e.type&&"audit"!==e.type?o("el-button",{staticClass:"button",attrs:{size:"mini",type:"primary"},on:{click:e.handleSelectWarehouseEntryBatch}},[e._v("选择")]):e._e()],1),e._v(" "),o("div",{staticStyle:{width:"100%",display:"block"}},[o("el-form-item",{staticStyle:{width:"100%"}},[o("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:e.goodsExchangeAddForm.product_list,border:"","cell-style":{textAlign:"center"},"header-cell-style":{textAlign:"center"}}},[o("el-table-column",{attrs:{label:"商品编号"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.goods_vo.sn)+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"商品名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.goods_vo.name)+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"sku"},scopedSlots:e._u([{key:"default",fn:function(t){return[(e.id,o("span",[e._v(e._s(t.row.product_vo.sku))]))]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"序列号"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("div",{staticClass:"sn-code-container"},e._l(t.row.sn_code_list,function(t){return o("span",{key:t.id},[o("p",[e._v(e._s(t.sn_code))])])}),0)]}}])}),e._v(" "),(e.id,o("el-table-column",{attrs:{prop:"product_vo.spec_name",label:"规格型号"}})),e._v(" "),o("el-table-column",{attrs:{label:"单位"},scopedSlots:e._u([{key:"default",fn:function(t){return[(e.id,o("span",[e._v(e._s(t.row.product_vo.unit))]))]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"入库数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-input-number",{attrs:{type:"number",min:0,maxlength:20,disabled:"detail"===e.type||"audit"===e.type},model:{value:t.row.num,callback:function(o){e.$set(t.row,"num",o)},expression:"scope.row.num"}})]}}])}),e._v(" "),"HAIL_ENTRY"==e.goodsExchangeAddForm.type||"SALE_AFTER"==e.goodsExchangeAddForm.type?o("el-table-column",{attrs:{label:"订单数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.order_num)+"\n ")]}}],null,!1,600663450)}):e._e(),e._v(" "),"SALE_AFTER"==e.goodsExchangeAddForm.type?o("el-table-column",{attrs:{label:"退货数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.return_num)+"\n ")]}}],null,!1,4287798430)}):e._e(),e._v(" "),o("el-table-column",{attrs:{label:"差异"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.order_num?o("span",[e._v(e._s(t.row.num-t.row.order_num||0))]):e._e()]}}])}),e._v(" "),"detail"!==e.type&&"audit"!==e.type?o("el-table-column",{attrs:{width:"200",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(o){return e.goodsExchangeAddForm.product_list.splice(t.$index,1)}}},[e._v("删除")])]}}],null,!1,1006518692)}):e._e()],1)],1)],1)],1),e._v(" "),o("div",{staticClass:"footer"},["audit"!==e.type&&"detail"!==e.type?o("el-button",{attrs:{type:"primary"},on:{click:e.savegoodsExchangeAddForm}},[e._v("保存\n ")]):e._e(),e._v(" "),"audit"!==e.type&&"detail"!==e.type?o("el-button",{attrs:{type:"primary"},on:{click:e.submitgoodsExchangeAddForm}},[e._v("入库\n ")]):e._e(),e._v(" "),"audit"==e.type?o("el-button",{on:{click:e.printIng}},[e._v("打印")]):e._e(),e._v(" "),o("el-button",{on:{click:function(t){return e.toBack()}}},[e._v("返回")])],1),e._v(" "),o("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[o("el-form",{ref:"goodsExchangeAddForm",staticStyle:{width:"900px"},attrs:{model:e.goodsExchangeAddForm,"label-width":"120px",inline:""}},[o("el-form-item",{attrs:{label:"驳回原因",prop:"reject_reason"}},[o("el-input",{attrs:{type:"textarea",minlength:0,maxlength:100},model:{value:e.goodsExchangeAddForm.reject_reason,callback:function(t){e.$set(e.goodsExchangeAddForm,"reject_reason",t)},expression:"goodsExchangeAddForm.reject_reason"}})],1)],1),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleRejectGoodsExchange()}}},[e._v("确 定")])],1)],1),e._v(" "),o("el-dialog",{attrs:{title:"扫码入库",visible:e.scanDialogVisible,width:"30%","close-on-click-modal":!1},on:{"update:visible":function(t){e.scanDialogVisible=t}}},[o("el-form",{ref:"scanGoodsForm",attrs:{model:e.scanGoodsForm,"label-width":"120px",inline:""}},[o("el-form-item",{attrs:{label:"sku",prop:"bar_code"}},[o("el-input",{ref:"input",attrs:{minlength:0,maxlength:100},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch()}},model:{value:e.scanGoodsForm.bar_code,callback:function(t){e.$set(e.scanGoodsForm,"bar_code",t)},expression:"scanGoodsForm.bar_code"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"序列号",prop:"sn_code"}},[o("el-input",{ref:"sn_input",attrs:{minlength:0,maxlength:100},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSnCode()}},model:{value:e.sn_code,callback:function(t){e.sn_code=t},expression:"sn_code"}})],1)],1)],1),e._v(" "),o("el-dialog",{attrs:{title:"入库商品",visible:e.goodsVisible,width:"1000px"},on:{"update:visible":function(t){e.goodsVisible=t},close:e.closeGoosData}},[o("el-table",{staticStyle:{width:"100%"},attrs:{data:e.goodsData.records,border:""},on:{"selection-change":e.handleSelectionChange}},[o("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),o("el-table-column",{attrs:{prop:"",label:"商品编号"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.goods_vo.sn)+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"product_vo.sku",label:"sku"}}),e._v(" "),o("el-table-column",{attrs:{prop:"",label:"商品名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.goods_vo.name)+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"product_vo.spec_name",label:"规格型号"}}),e._v(" "),o("el-table-column",{attrs:{prop:"product_vo.unit",label:"单位"}})],1),e._v(" "),o("el-pagination",{attrs:{"current-page":e.goodsData.current,"page-sizes":[10,20,50,100],"page-size":e.goodsData.size,layout:"total, sizes, prev, pager, next, jumper",total:e.goodsData.total},on:{"size-change":e.goodsPageSizeChange,"current-change":e.goodsPageCurrentChange}}),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:e.closeGoosData}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitGoosData()}}},[e._v("确 定")])],1)],1),e._v(" "),o("el-dialog",{attrs:{title:"订单列表",visible:e.orderVisible,width:"1000px"},on:{"update:visible":function(t){e.orderVisible=t},close:e.closeGoosData}},[o("el-table",{ref:"tables",staticStyle:{width:"100%"},attrs:{data:e.orderList.data,border:""},on:{"selection-change":e.handleSelOrderChange}},[o("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),o("el-table-column",{attrs:{prop:"",label:"订单编号"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.sn)+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"order_time",label:"下单时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("unixToDate")(t.row.order_time)))]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"",label:"仓库名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.warehouseName(t.row.warehouse_id))+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"",label:"配送方式"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e.deliveryType(t.row.send_type)))]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"",label:"实付金额"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s("¥"+t.row.pay_price))]}}])})],1),e._v(" "),o("el-pagination",{attrs:{"current-page":e.orderList.page_no,"page-sizes":[10,20,50,100],"page-size":e.orderList.page_size,layout:"total, sizes, prev, pager, next, jumper",total:e.orderList.data_total},on:{"size-change":e.handlePageSizeChange,"current-change":e.handlePageCurrentChange}}),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:e.closeOrder}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:e.searchOrderAdd}},[e._v("确 定")])],1)],1)],1)},[],!1,b,"data-v-d123e04c",null);t.default=y.exports},h7CI:function(e,t,o){var n=o("Owwo");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);o("rjj0")("1b5342e6",n,!0)}});