13.b2b0f6d2.js 35 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[13],{"168a":function(e,t,a){"use strict";var o=a("d288"),n=a.n(o);t["default"]=n.a},"1cf8":function(e,t,a){"use strict";a("a598")},"213c":function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e._self._c;return t("div",[t("transition",{attrs:{appear:"","enter-active-class":"animated fadeIn"}},[t("q-table",{staticClass:"my-sticky-header-column-table shadow-24",attrs:{data:e.table_list,"row-key":"id",separator:e.separator,loading:e.loading,columns:e.columns,"hide-bottom":"",pagination:e.pagination,"no-data-label":"No data","no-results-label":"No data you want","table-style":{height:e.height},flat:"",bordered:""},on:{"update:pagination":function(t){e.pagination=t}},scopedSlots:e._u([{key:"top",fn:function(){return[t("q-btn-group",{attrs:{push:""}},[t("q-btn",{attrs:{label:e.$t("new"),icon:"add"},on:{click:function(t){e.newForm=!0,e.newFormData.creater=e.login_name}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("newtip")))])],1),t("q-btn",{attrs:{label:e.$t("refresh"),icon:"refresh"},on:{click:function(t){return e.reFresh()}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("refreshtip")))])],1)],1),t("q-space"),t("div",{staticClass:"flex items-center"},[t("q-input",{attrs:{outlined:"",rounded:"",dense:"",debounce:"200",color:"primary",placeholder:"输入名称搜索"},on:{input:function(t){return e.getSearchList()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getSearchList()}},scopedSlots:e._u([{key:"append",fn:function(){return[t("q-icon",{attrs:{name:"search"}})]},proxy:!0}]),model:{value:e.filter,callback:function(t){e.filter=t},expression:"filter"}})],1)]},proxy:!0},{key:"body",fn:function(a){return[t("q-tr",{attrs:{props:a}},[a.row.id===e.editid||a.row.id!==e.editid?[t("q-td",{key:"detail",attrs:{props:a}},[t("q-btn",{attrs:{round:"",flat:"",push:"",color:"black",icon:"description"},on:{click:function(t){return e.detailData(a.row)}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v(e._s("查看批次详情"))])],1)],1)]:e._e(),a.row.id===e.editid||a.row.id!==e.editid?[t("q-td",{key:"bound_date",attrs:{props:a}},[e._v(e._s(a.row.bound_date))])]:e._e(),a.row.id===e.editid||a.row.id!==e.editid?[t("q-td",{key:"bound_code",attrs:{props:a}},[e._v(e._s(a.row.bound_code))])]:e._e(),a.row.id===e.editid?[t("q-td",{key:"bound_code_type",attrs:{props:a}},[t("q-select",{attrs:{dense:"",outlined:"",square:"",label:"单据类型",autofocus:"",options:e.bound_code_type_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.editFormData.bound_code_type,callback:function(t){e.$set(e.editFormData,"bound_code_type",t)},expression:"editFormData.bound_code_type"}})],1)]:a.row.id!==e.editid?[t("q-td",{key:"bound_code_type",attrs:{props:a}},[e._v("\n "+e._s(e.bound_code_type_map[a.row.bound_code_type]||a.row.bound_code_type))])]:e._e(),a.row.id===e.editid?[t("q-td",{key:"bound_bs_type",attrs:{props:a}},[t("q-select",{attrs:{dense:"",outlined:"",square:"",label:"单据类型",options:e.bound_bs_type_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.editFormData.bound_bs_type,callback:function(t){e.$set(e.editFormData,"bound_bs_type",t)},expression:"editFormData.bound_bs_type"}})],1)]:a.row.id!==e.editid?[t("q-td",{key:"bound_bs_type",attrs:{props:a}},[e._v("\n "+e._s(e.bound_bs_type_map[a.row.bound_bs_type]||a.row.bound_bs_type))])]:e._e(),a.row.id===e.editid?[t("q-td",{key:"bound_desc",attrs:{props:a}},[t("q-select",{attrs:{dense:"",outlined:"",square:"",label:"出入库类别",options:e.bound_desc_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.editFormData.bound_desc,callback:function(t){e.$set(e.editFormData,"bound_desc",t)},expression:"editFormData.bound_desc"}})],1)]:a.row.id!==e.editid?[t("q-td",{key:"bound_desc",attrs:{props:a}},[e._v("\n "+e._s(e.bound_desc_map[a.row.bound_desc]||a.row.bound_desc))])]:e._e(),a.row.id===e.editid?[t("q-td",{key:"bound_department",attrs:{props:a}},[t("q-select",{attrs:{dense:"",outlined:"",square:"",label:"部门",options:e.bound_department_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.editFormData.bound_department,callback:function(t){e.$set(e.editFormData,"bound_department",t)},expression:"editFormData.bound_department"}})],1)]:a.row.id!==e.editid?[t("q-td",{key:"bound_department",attrs:{props:a}},[e._v("\n "+e._s(e.bound_department_map[a.row.bound_department]||a.row.bound_department))])]:e._e(),a.row.id===e.editid?[t("q-td",{key:"creater",attrs:{props:a}},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"经办人",rules:[t=>t&&t>0||e.error1]},model:{value:e.editFormData.creater,callback:function(t){e.$set(e.editFormData,"creater",e._n(t))},expression:"editFormData.creater"}})],1)]:a.row.id!==e.editid?[t("q-td",{key:"creater",attrs:{props:a}},[e._v(e._s(a.row.creater))])]:e._e(),a.row.id===e.editid||a.row.id!==e.editid?[t("q-td",{key:"bound_status",attrs:{props:a}},[e._v("\n "+e._s(e.bound_status_map[a.row.bound_status]||a.row.bound_status))])]:e._e(),e.editMode?e.editMode?[a.row.id===e.editid?[t("q-td",{key:"action",staticStyle:{width:"100px"},attrs:{props:a}},[t("q-btn",{attrs:{round:"",flat:"",push:"",color:"secondary",icon:"check"},on:{click:function(t){return e.editDataSubmit()}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("confirmedit")))])],1),t("q-btn",{attrs:{round:"",flat:"",push:"",color:"red",icon:"close"},on:{click:function(t){return e.editDataCancel()}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("canceledit")))])],1)],1)]:a.row.id!==e.editid?void 0:e._e()]:e._e():[t("q-td",{key:"action",staticStyle:{width:"100px"},attrs:{props:a}},[t("q-btn",{attrs:{round:"",flat:"",push:"",color:"dark",icon:"trolley"},on:{click:function(t){return e.change_status(a.row)}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v("一键分拣")])],1)],1)]],2)]}}])})],1),[t("div",{directives:[{name:"show",rawName:"v-show",value:0!==e.max,expression:"max !== 0"}],staticClass:"q-pa-lg flex flex-center"},[t("div",[e._v(e._s(e.total))]),t("q-pagination",{attrs:{color:"black",max:e.max,"max-pages":6,"boundary-links":""},on:{click:function(t){e.getSearchList(e.current),e.paginationIpt=e.current}},model:{value:e.current,callback:function(t){e.current=t},expression:"current"}}),t("div",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.paginationIpt,expression:"paginationIpt"}],staticStyle:{width:"60px","text-align":"center"},domProps:{value:e.paginationIpt},on:{blur:e.changePageEnter,keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.changePageEnter.apply(null,arguments)},input:function(t){t.target.composing||(e.paginationIpt=t.target.value)}}})])],1),t("div",{directives:[{name:"show",rawName:"v-show",value:0===e.max,expression:"max === 0"}],staticClass:"q-pa-lg flex flex-center"},[t("q-btn",{attrs:{flat:"",push:"",color:"dark",label:e.$t("no_data")}})],1)],t("q-dialog",{model:{value:e.newForm,callback:function(t){e.newForm=t},expression:"newForm"}},[t("q-card",{staticClass:"shadow-24"},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v(e._s(e.$t("newtip")))]),t("q-space"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4"}},[e._v(e._s(e.$t("index.close")))])],1)],1),t("q-card-section",{staticClass:"scroll",staticStyle:{"max-height":"325px",width:"400px"}},[t("q-select",{attrs:{dense:"",outlined:"",square:"",label:"单据类型",autofocus:"",options:e.bound_code_type_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newFormData.bound_code_type,callback:function(t){e.$set(e.newFormData,"bound_code_type",t)},expression:"newFormData.bound_code_type"}}),t("q-select",{attrs:{dense:"",outlined:"",square:"",label:"业务类型",options:e.bound_bs_type_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newFormData.bound_bs_type,callback:function(t){e.$set(e.newFormData,"bound_bs_type",t)},expression:"newFormData.bound_bs_type"}}),t("q-select",{attrs:{dense:"",outlined:"",square:"",label:"出入库类别",options:e.bound_desc_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newFormData.bound_desc,callback:function(t){e.$set(e.newFormData,"bound_desc",t)},expression:"newFormData.bound_desc"}}),t("q-select",{attrs:{dense:"",outlined:"",square:"",label:"部门",options:e.bound_department_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newFormData.bound_department,callback:function(t){e.$set(e.newFormData,"bound_department",t)},expression:"newFormData.bound_department"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"经办人",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newFormData.creater,callback:function(t){e.$set(e.newFormData,"creater",t)},expression:"newFormData.creater"}})],1),t("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[t("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(t){return e.newDataCancel()}}},[e._v(e._s(e.$t("cancel")))]),t("q-btn",{attrs:{color:"primary"},on:{click:function(t){return e.newDataSubmit()}}},[e._v(e._s(e.$t("submit")))])],1)],1)],1),t("q-dialog",{model:{value:e.deleteForm,callback:function(t){e.deleteForm=t},expression:"deleteForm"}},[t("q-card",{staticClass:"shadow-24"},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v(e._s(e.$t("delete")))]),t("q-space"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[t("q-tooltip",[e._v(e._s(e.$t("index.close")))])],1)],1),t("q-card-section",{staticClass:"scroll",staticStyle:{"max-height":"325px",width:"400px"}},[e._v(e._s(e.$t("deletetip")))]),t("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[t("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(t){return e.deleteDataCancel()}}},[e._v(e._s(e.$t("cancel")))]),t("q-btn",{attrs:{color:"primary"},on:{click:function(t){return e.deleteDataSubmit()}}},[e._v(e._s(e.$t("submit")))])],1)],1)],1),t("q-dialog",{model:{value:e.newBatchForm,callback:function(t){e.newBatchForm=t},expression:"newBatchForm"}},[t("q-card",{staticClass:"shadow-24"},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v(e._s("新建批次"))]),t("q-space"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4"}},[e._v(e._s(e.$t("index.close")))])],1)],1),t("q-card-section",{staticClass:"scroll",staticStyle:{"min-height":"325px",width:"500px"}},[t("div",{staticClass:"text-h6 q-mb-md"},[e._v(e._s("批次信息"))]),t("div",{staticClass:"row q-gutter-x-md"},[t("div",{staticClass:"col column q-gutter-y-md"},[t("q-select",{attrs:{dense:"",outlined:"",square:"",label:"物料编码",options:e.product_list,"option-label":"value","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[t=>t&&t.length>0||e.error1],onClick:e.assignGoodsCode()},model:{value:e.newBatchFormData.goods_code,callback:function(t){e.$set(e.newBatchFormData,"goods_code",t)},expression:"newBatchFormData.goods_code"}})],1),t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{outlined:"",dense:"",color:"primary",placeholder:"搜索名称",autofocus:""},on:{input:function(t){return e.getProductSearchList()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getProductSearchList()}},scopedSlots:e._u([{key:"append",fn:function(){return[t("q-icon",{attrs:{name:"search"}})]},proxy:!0}]),model:{value:e.product_filter,callback:function(t){e.product_filter=t},expression:"product_filter"}})],1)]),t("q-select",{attrs:{dense:"",outlined:"",square:"",label:"物料",options:e.product_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"",readonly:!1,"transition-show":"scale","transition-hide":"scale",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newBatchFormData.goods_code,callback:function(t){e.$set(e.newBatchFormData,"goods_code",t)},expression:"newBatchFormData.goods_code"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"名称",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newBatchFormData.goods_desc,callback:function(t){e.$set(e.newBatchFormData,"goods_desc",t)},expression:"newBatchFormData.goods_desc"}}),t("div",{staticClass:"row q-gutter-x-md"},[t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"数量",type:"number",rules:[t=>t&&t>0||e.error1]},model:{value:e.newBatchFormData.goods_qty,callback:function(t){e.$set(e.newBatchFormData,"goods_qty",e._n(t))},expression:"newBatchFormData.goods_qty"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"包装",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newBatchFormData.goods_package,callback:function(t){e.$set(e.newBatchFormData,"goods_package",t)},expression:"newBatchFormData.goods_package"}}),t("q-toggle",{attrs:{label:e.isorder?"自动编码":"手动编码(建议)"},model:{value:e.isorder,callback:function(t){e.isorder=t},expression:"isorder"}})],1),t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"单位",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newBatchFormData.goods_unit,callback:function(t){e.$set(e.newBatchFormData,"goods_unit",t)},expression:"newBatchFormData.goods_unit"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"规格/备注",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newBatchFormData.goods_std,callback:function(t){e.$set(e.newBatchFormData,"goods_std",t)},expression:"newBatchFormData.goods_std"}})],1)]),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.isorder,expression:"!isorder"}],staticClass:"row q-gutter-x-md"},[t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",type:"number",label:"年",rules:[t=>t&&t>0||e.error1]},model:{value:e.batch_number_year,callback:function(t){e.batch_number_year=t},expression:"batch_number_year"}})],1),t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"月",type:"number",rules:[t=>t&&t>0||e.error1]},model:{value:e.batch_number_month,callback:function(t){e.batch_number_month=t},expression:"batch_number_month"}})],1),t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",type:"number",label:"批",rules:[e=>e&&e>0||"请输入正确的批号"]},model:{value:e.batch_number_batch,callback:function(t){e.batch_number_batch=t},expression:"batch_number_batch"}})],1)]),t("q-input",{directives:[{name:"show",rawName:"v-show",value:!e.isorder,expression:"!isorder"}],staticClass:"centered-input",attrs:{dense:"",outlined:"",square:"",label:"批号——年月第几批(202504009)",type:"number",rules:[t=>t&&t>0||e.error1]},model:{value:e.newBatchFormData.bound_batch_order,callback:function(t){e.$set(e.newBatchFormData,"bound_batch_order",e._n(t))},expression:"newBatchFormData.bound_batch_order"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"经办人",rules:[t=>t&&t.length>0||e.error1]},model:{value:e.newBatchFormData.creater,callback:function(t){e.$set(e.newBatchFormData,"creater",t)},expression:"newBatchFormData.creater"}})],1),t("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[t("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(t){return e.newBatchCancel()}}},[e._v(e._s(e.$t("cancel")))]),t("q-btn",{attrs:{color:"primary"},on:{click:function(t){return e.newBatchSubmit()}}},[e._v(e._s(e.$t("submit")))])],1)],1)],1),t("q-dialog",{attrs:{"transition-show":"jump-down","transition-hide":"jump-up"},model:{value:e.detailForm,callback:function(t){e.detailForm=t},expression:"detailForm"}},[t("q-card",{staticStyle:{"min-width":"1150px"}},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v("\n "+e._s("批次信息")+"\n ")]),t("q-space"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[20,20],"content-style":"font-size: 12px"}},[e._v("\n "+e._s(e.$t("index.close")))])],1)],1),t("q-card-section",{staticClass:"q-pt-md"},[t("q-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("q-tab",{attrs:{name:"tab1",label:"入库信息"}})],1)],1),t("q-tab-panels",{attrs:{animated:""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("q-tab-panel",{staticStyle:{height:"70px"},attrs:{name:"tab1"}},[t("div",{staticClass:"row q-gutter-x-md"},[t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"单据时间",readonly:!0},model:{value:e.table_detail.bound_date,callback:function(t){e.$set(e.table_detail,"bound_date",t)},expression:"table_detail.bound_date"}})],1),t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"单据编码",readonly:!0},model:{value:e.table_detail.bound_code,callback:function(t){e.$set(e.table_detail,"bound_code",t)},expression:"table_detail.bound_code"}})],1)])])],1),t("div",{staticStyle:{float:"right",padding:"15px 15px 50px 15px","min-width":"100%"},attrs:{flow:"row wrap"}},[t("q-card",{staticClass:"q-mb-md",attrs:{bordered:""}},[t("q-card-actions",{staticClass:"q-px-none",staticStyle:{position:"absolute",right:"20px",top:"10px","z-index":"100"}},[t("q-btn",{attrs:{icon:"add",flat:"",dense:"",color:"primary",label:e.$t("stock.add")},on:{click:function(t){return e.addbatch(e.table_detail.id)}}})],1),t("q-card-section",[[t("div",{staticClass:"text-h6 q-mb-md"},[e._v(e._s("批次信息"))]),e.batch_detail.length>0?t("q-table",{staticClass:"my-sticky-table scrollable-table",style:{"max-height":"400px"},attrs:{data:e.batch_detail,columns:e.columns_batch,"row-key":"id",flat:"",bordered:"","hide-pagination":"","container-style":{height:"auto"},pagination:{rowsPerPage:0}},scopedSlots:e._u([{key:"body-cell-actions",fn:function(a){return[t("q-td",{attrs:{props:a}},[t("q-btn",{directives:[{name:"print",rawName:"v-print",value:e.getPrintConfig(a.row),expression:"getPrintConfig(props.row)"}],attrs:{icon:"print",flat:""},on:{click:function(t){return e.setCurrentBatch(a.row)}}},[t("q-tooltip",[e._v("打印条码")])],1)],1)]}}],null,!1,710488229)}):e._e()]],2)],1)],1)],1)],1),t("div",{staticClass:"print-area",attrs:{id:"printBarcode"}},[t("div",{staticClass:"q-pa-md text-center",staticStyle:{flex:"none"}},[t("div",{staticClass:"row no-wrap"},[t("div",{staticClass:"col text-left"},[t("p",{staticStyle:{"font-weight":"500"}},[e._v(e._s(e.currentgoods.goods_desc))])]),t("div",{staticClass:"col text-right"},[t("p",[e._v("\n 数量: "+e._s(e.currentgoods.goods_qty)+e._s(e.currentgoods.goods_unit)+"\n ")])])]),t("svg",{ref:"barcodeElement",staticStyle:{width:"100%",height:"auto"}})])])],2)},n=[],s=(a("ddb0"),a("9861"),a("a79d"),a("5319"),a("3004")),r=a("62c5"),i=a.n(r),d=a("bd4c"),l=a("a357"),c=a("18d6"),u=a("9564"),_={components:{QToggle:u["a"]},name:"Pageasnlist",data(){return{createDate1:"",createDate2:"",date_range:"",proxyDate:"",date:"",goods_code:"",goods_desc:"",openid:"",login_name:"",authin:"0",warehouse_code:"",warehouse_name:"",searchUrl:"",pathname:"bound/list/",pathfilename:"bound/file/",pathname_previous:"",pathname_next:"",separator:"cell",loading:!1,height:"",printObj:{id:"printMe",popTitle:this.$t("inbound.asn")},table_list:[],table_detail:{},batch_detail:[],bound_code_type_list:[],bound_code_type_map:[],bound_bs_type_list:[],bound_bs_type_map:[],bound_desc_list:[],bound_desc_map:[],bound_department_list:[],bound_department_map:[],bound_status_list:[],bound_status_map:[],product_list:[],product_map:[],batch_number_year:"",batch_number_month:"",batch_number_batch:"",columns:[{name:"detail",label:"详情",field:"detail",align:"center"},{name:"bound_date",label:"单据日期",field:"bound_date",align:"center"},{name:"bound_code",label:"单据编号",field:"bound_code",align:"center"},{name:"bound_code_type",label:"单据类型",field:"bound_code_type",align:"center"},{name:"bound_bs_type",label:"业务类型",field:"bound_bs_type",align:"center"},{name:"bound_desc",label:"出入库类别",field:"bound_desc",align:"center"},{name:"bound_department",label:"部门",field:"bound_department",align:"center"},{name:"creater",label:"经办人",field:"creater",align:"center"},{name:"bound_status",label:"状态",field:"bound_status",align:"center"},{name:"action",label:"操作",align:"center"}],columns_batch:[{name:"actions",label:"操作",align:"center",style:"width: 80px"},{name:"bound_batch_order",label:"批次",field:e=>e.bound_batch.bound_batch_order,align:"center"},{name:"goods_desc",label:"货物",field:e=>e.bound_batch.goods_desc,align:"center"},{name:"plan_weight",label:"计划入库重量",field:e=>e.bound_batch.goods_qty,align:"center",style:"width: 150px"},{name:"actual_weight",label:"实际入库重量",field:e=>e.bound_batch.goods_in_qty,align:"center",style:"width: 150px"},{name:"unit",label:"单位",field:e=>e.bound_batch.goods_unit,align:"center",style:"width: 10px"},{name:"package",label:"包装",field:e=>e.bound_batch.goods_package,align:"center",style:"width: 10px"}],filter:"",product_filter:"",pagination:{page:1,rowsPerPage:11},newForm:!1,newBatchForm:!1,newFormData:{},newBatchFormData:{},newDetailFormData:{},editid:0,editFormData:{},editMode:!1,deleteForm:!1,detailForm:!1,deleteid:0,detailid:0,bar_code:"",error1:this.$t("goods.view_goodslist.error1"),max:0,total:0,paginationIpt:1,current:1,onlyread:!0,bound_batch_list:[],activeTab:"tab1",isorder:!1,order:"false",printConfig:{id:"printBarcode"},currentBarcode:null,currentgoods:{}}},computed:{interval(){return this.$t("download_center.start")+" - "+this.$t("download_center.end")}},methods:{assignGoodsCode(){console.log("data",this.newBatchFormData.goods_code),console.log("product_map",this.product_map[this.newBatchFormData.goods_code]),this.product_map[this.newBatchFormData.goods_code]&&(this.newBatchFormData.goods_desc=this.product_map[this.newBatchFormData.goods_code].product_name,this.newBatchFormData.goods_std=this.product_map[this.newBatchFormData.goods_code].product_std,this.newBatchFormData.goods_unit=this.product_map[this.newBatchFormData.goods_code].product_unit,this.newBatchFormData.goods_package=this.product_map[this.newBatchFormData.goods_code].product_package,this.newBatchFormData.goods_weight=1)},setCurrentBatch(e){var t;this.currentBarcode=(null===(t=e.bound_batch)||void 0===t?void 0:t.bound_number)||"",this.currentgoods=e.bound_batch},getPrintConfig(){return this.generateBarcode(),{id:"printBarcode"}},generateBarcode(){this.$refs.barcodeElement.innerHTML="";try{i()(this.$refs.barcodeElement,this.currentBarcode,{format:"CODE128",displayValue:!0,fontSize:16,height:60,margin:10})}catch(e){console.error("条码生成失败:",e)}},getList(e={}){var t=this;t.loading=!0;const a={page:t.current,base_type:"0",page_size:t.pagination.rowsPerPage},o=new URLSearchParams({...a,...e});console.log(o),Array.from(o.entries()).forEach((([e,t])=>{""!==t&&null!==t&&void 0!==t||o.delete(e)})),Object(s["e"])(`${t.pathname}?${o}`).then((e=>{t.table_list=e.results,t.total=e.count,t.max=Math.ceil(e.count/t.pagination.rowsPerPage)||0,t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})).finally((()=>{t.loading=!1}))},changePageEnter(){Number(this.paginationIpt)<1?(this.current=1,this.paginationIpt=1):Number(this.paginationIpt)>this.max?(this.current=this.max,this.paginationIpt=this.max):this.current=Number(this.paginationIpt),this.getSearchList(this.current)},getProductSearchList(){var e=this;e.loading=!0;const t={product_name__icontains:e.product_filter,max_page:1e3},a=new URLSearchParams({...t});console.log(a),Array.from(a.entries()).forEach((([e,t])=>{""!==t&&null!==t&&void 0!==t||a.delete(e)})),console.log(`warehouse/product/?${a}`),Object(s["e"])(`warehouse/product/?${a}`).then((t=>{e.product_list=t.results.map((e=>({label:e.product_name,value:e.product_code}))),e.product_map=t.results.reduce(((e,t)=>(e[t.product_code]=t,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})).finally((()=>{e.loading=!1}))},getSearchList(e=1){this.current=e,this.paginationIpt=e,this.getList({goods_desc__icontains:this.filter,document_date__range:this.date_range})},downloadlistData(){this.getfileList()},getfileList(){var e=this;e.loading=!0;const t={goods_desc__icontains:e.filter,document_date__range:e.date_range},a=new URLSearchParams({...t});console.log(a),Array.from(a.entries()).forEach((([e,t])=>{""!==t&&null!==t&&void 0!==t||a.delete(e)})),console.log(`${e.pathfilename}?${a}`),Object(s["e"])(`${e.pathfilename}?${a}`).then((t=>{var a=Date.now(),o=d["b"].formatDate(a,"YYYYMMDDHHmmss");const n=Object(l["a"])(e.pathfilename+"list"+o+".csv","\ufeff"+t,"text/csv");!0!==n&&e.$q.notify({message:"Browser denied file download...",color:"negative",icon:"warning"})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})).finally((()=>{e.loading=!1}))},getListPrevious(){var e=this;c["a"].has("auth")&&Object(s["e"])(e.pathname_previous,{}).then((t=>{e.table_list=t.results,e.pathname_previous=t.previous,e.pathname_next=t.next})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},getListNext(){var e=this;c["a"].has("auth")&&Object(s["e"])(e.pathname_next,{}).then((t=>{e.table_list=t.results,e.pathname_previous=t.previous,e.pathname_next=t.next})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},reFresh(){var e=this;e.getSearchList()},newDataSubmit(){var e=this;e.newFormData.bound_type="in",e.newFormData.openid=e.openid,Object(s["h"])(e.pathname,e.newFormData).then((t=>{e.getSearchList(),e.newDataCancel(),500!==t.status_code&&e.$q.notify({message:"成功新增数据",icon:"check",color:"green"})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},newBatchSubmit(){var e=this;e.newBatchFormData.openid=e.openid,e.newBatchFormData.warehouse_code=e.warehouse_code,e.newBatchFormData.warehouse_name=e.warehouse_name,e.newBatchFormData.order=e.order,console.log("当前的order是",e.newBatchFormData.order),Object(s["h"])("bound/batch/",e.newBatchFormData).then((t=>{500!==t.status_code&&(e.newDetailFormData.bound_batch=t.id,e.newDetailFormData.creater=e.login_name,Object(s["h"])("bound/detail/",e.newDetailFormData).then((t=>{500!==t.status_code&&(e.detailData(e.newDetailFormData),e.$q.notify({message:"成功新增数据",icon:"check",color:"green"}))}),(t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})))})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},newDataCancel(){var e=this;e.newForm=!1,e.newFormData={bound_code_type:"",bound_bs_type:"",bound_desc:"",bound_department:"",creater:""}},addbatch(e){var t=this;t.newBatchForm=!0,t.batch_number_year=t.date.slice(0,4),t.batch_number_month=t.date.slice(5,7),t.newBatchFormData.creater=t.login_name,t.newDetailFormData={id:e,bound_list:e}},editData(e){var t=this;t.editMode=!0,t.editid=e.id,t.editFormData={bound_date:e.bound_date,bound_code:e.bound_code,bound_code_type:e.bound_code_type,bound_bs_type:e.bound_bs_type,bound_desc:e.bound_desc,bound_department:e.bound_department,creater:t.login_name}},change_status(e){var t=this,a={bound_date:e.bound_date,bound_code:e.bound_code,bound_code_type:e.bound_code_type,bound_bs_type:e.bound_bs_type,bound_desc:e.bound_desc,bound_department:e.bound_department,creater:t.login_name,bound_type:"in",bound_status:"101"};Object(s["i"])(t.pathname+e.id+"/",a).then((e=>{t.editDataCancel(),t.getSearchList(),500!==e.status_code&&t.$q.notify({message:"开始入库",icon:"check",color:"green"})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},editDataSubmit(){var e=this;e.editFormData.bound_type="in",Object(s["i"])(e.pathname+e.editid+"/",e.editFormData).then((t=>{e.editDataCancel(),e.getSearchList(),500!==t.status_code&&e.$q.notify({message:"成功编辑数据",icon:"check",color:"green"})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},editDataCancel(){var e=this;e.editMode=!1,e.editid=0,e.editFormData={bound_date:"",bound_code:"",bound_code_type:"",bound_bs_type:"",bound_desc:"",bound_department:"",creater:""}},deleteData(e){var t=this;t.deleteForm=!0,t.deleteid=e},detailData(e){var t=this;t.detailForm=!0,t.detailid=e.id,console.log("detail查询的id是:",t.detailid),Object(s["e"])(t.pathname+t.detailid+"/").then((e=>{t.table_detail=e})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})),console.log("detail查询的结果是:",t.table_detail),Object(s["e"])("bound/detail/?max_page=1000&bound_list="+t.detailid).then((e=>{t.batch_detail=e.results})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})),console.log("batch查询的结果是:",t.batch_detail),console.log("batch长度查询的结果是:",t.batch_detail.length)},deleteDataSubmit(){var e=this;Object(s["c"])(e.pathname+e.deleteid+"/").then((t=>{e.deleteDataCancel(),e.getSearchList(),e.$q.notify({message:"成功删除数据",icon:"check",color:"green"})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},deleteDataCancel(){var e=this;e.deleteForm=!1,e.deleteid=0},updateProxy(){var e=this;e.proxyDate=e.date}},created(){var e=this;if(c["a"].has("openid")?e.openid=c["a"].getItem("openid"):(e.openid="",c["a"].set("openid","")),c["a"].has("warehouse_code")&&(e.warehouse_code=c["a"].getItem("warehouse_code")),c["a"].has("warehouse_name")&&(e.warehouse_name=c["a"].getItem("warehouse_name")),c["a"].has("login_name")?e.login_name=c["a"].getItem("login_name"):(e.login_name="",c["a"].set("login_name","")),c["a"].has("auth")){const t=Date.now(),a=d["b"].formatDate(t,"YYYY/MM/DD");e.date=a,console.log(e.date),e.authin="1",e.getList()}else e.authin="0";Object(s["e"])("warehouse/boundcodetype/",{}).then((t=>{e.bound_code_type_list=t.results.map((e=>({label:e.bound_code_type_name,value:e.bound_code_type_code}))),e.bound_code_type_map=t.results.reduce(((e,t)=>(e[t.bound_code_type_code]=t.bound_code_type_name,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),Object(s["e"])("warehouse/boundtype/",{}).then((t=>{e.bound_desc_list=t.results.map((e=>({label:e.bound_type_name,value:e.bound_type_code}))),e.bound_desc_map=t.results.reduce(((e,t)=>(e[t.bound_type_code]=t.bound_type_name,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),Object(s["e"])("warehouse/department/?max_page=1000",{}).then((t=>{e.bound_department_list=t.results.map((e=>({label:e.department_name,value:e.department_code}))),e.bound_department_map=t.results.reduce(((e,t)=>(e[t.department_code]=t.department_name,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),Object(s["e"])("warehouse/boundbusiness/",{}).then((t=>{e.bound_bs_type_list=t.results.map((e=>({label:e.bound_bs_name,value:e.bound_bs_code}))),e.bound_bs_type_map=t.results.reduce(((e,t)=>(e[t.bound_bs_code]=t.bound_bs_name,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),Object(s["e"])("warehouse/status/",{}).then((t=>{e.bound_status_list=t.results.map((e=>({label:e.bound_status_name,value:e.bound_status_code}))),e.bound_status_map=t.results.reduce(((e,t)=>(e[t.bound_status_code]=t.bound_status_name,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},mounted(){var e=this;e.$q.platform.is.electron?e.height=String(e.$q.screen.height-290)+"px":e.height=e.$q.screen.height-290+"px",e.newFormData.creater=e.login_name},updated(){},destroyed(){},watch:{isorder:function(e){console.log(e),this.order=e?"true":"false"},batch_number_batch:function(e){console.log(e),this.newBatchFormData.bound_batch_order=1e4*this.batch_number_year+100*this.batch_number_month+e},createDate1(e){e?(e.to?(this.createDate2=`${e.from} - ${e.to}`,this.date_range=`${e.from},${e.to} `):(this.createDate2=`${e}`,this.dateArray=e.split("/"),this.searchUrl=this.pathname+"?document_date__year="+this.dateArray[0]+"&document_date__month="+this.dateArray[1]+"&document_date__day="+this.dateArray[2]),this.date_range=this.date_range.replace(/\//g,"-"),this.getSearchList(),this.$refs.qDateProxy.hide()):(this.createDate2="",this.date_range="",this.getSearchList())}}},p=_,b=(a("1cf8"),a("42e1")),m=a("168a"),h=a("eaac"),g=a("e7a9"),w=a("9c40"),v=a("05c0"),f=a("2c91"),y=a("27f9"),q=a("0016"),x=a("bd08"),D=a("db86"),k=a("ddd8"),F=a("3b16"),$=a("24e8"),B=a("f09f"),C=a("d847"),S=a("a370"),P=a("429b"),L=a("7460"),O=a("adad"),j=a("823b"),Q=a("4b7e"),I=a("52ee"),T=a("8572"),N=a("7f67"),E=a("eebe"),M=a.n(E),z=Object(b["a"])(p,o,n,!1,null,"0b6b2fc9",null);"function"===typeof m["default"]&&Object(m["default"])(z);t["default"]=z.exports;M()(z,"components",{QTable:h["a"],QBtnGroup:g["a"],QBtn:w["a"],QTooltip:v["a"],QSpace:f["a"],QInput:y["a"],QIcon:q["a"],QTr:x["a"],QTd:D["a"],QSelect:k["a"],QPagination:F["a"],QDialog:$["a"],QCard:B["a"],QBar:C["a"],QCardSection:S["a"],QToggle:u["a"],QTabs:P["a"],QTab:L["a"],QTabPanels:O["a"],QTabPanel:j["a"],QCardActions:Q["a"],QDate:I["a"],QField:T["a"]}),M()(z,"directives",{ClosePopup:N["a"]})},a598:function(e,t,a){},d288:function(e,t){}}]);