17.a21e08f6.js 39 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[17],{41462:function(t,e,a){"use strict";var o=a("f552"),n=a.n(o);e["default"]=n.a},"72af":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t._self._c;return e("div",[e("transition",{attrs:{appear:"","enter-active-class":"animated fadeIn"}},[e("q-table",{staticClass:"my-sticky-header-column-table shadow-24",attrs:{data:t.table_list,"row-key":"id",separator:t.separator,loading:t.loading,columns:t.columns,"hide-bottom":"",pagination:t.pagination,"no-data-label":"No data","no-results-label":"No data you want","table-style":{height:t.height},flat:"",bordered:""},on:{"update:pagination":function(e){t.pagination=e}},scopedSlots:t._u([{key:"top",fn:function(){return[e("q-btn-group",{attrs:{push:""}},[e("q-btn",{attrs:{label:t.$t("new"),icon:"add"},on:{click:function(e){t.newForm=!0,t.newFormData.creater=t.login_name}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v(t._s(t.$t("newtip")))])],1),e("q-btn",{attrs:{label:t.$t("refresh"),icon:"refresh"},on:{click:function(e){return t.reFresh()}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v(t._s(t.$t("refreshtip")))])],1)],1),e("q-space"),e("div",{staticClass:"flex items-center"},[e("q-input",{attrs:{outlined:"",rounded:"",dense:"",debounce:"200",color:"primary",placeholder:"输入名称搜索"},on:{input:function(e){return t.getSearchList()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getSearchList()}},scopedSlots:t._u([{key:"append",fn:function(){return[e("q-icon",{attrs:{name:"search"}})]},proxy:!0}]),model:{value:t.filter,callback:function(e){t.filter=e},expression:"filter"}})],1)]},proxy:!0},{key:"body",fn:function(a){return[e("q-tr",{attrs:{props:a}},[a.row.id===t.editid||a.row.id!==t.editid?[e("q-td",{key:"detail",attrs:{props:a}},[e("q-btn",{attrs:{round:"",flat:"",push:"",color:"black",icon:"description"},on:{click:function(e){return t.detailData(a.row)}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v(t._s("查看批次详情"))])],1)],1)]:t._e(),a.row.id===t.editid||a.row.id!==t.editid?[e("q-td",{key:"bound_date",attrs:{props:a}},[t._v(t._s(a.row.bound_date))])]:t._e(),a.row.id===t.editid||a.row.id!==t.editid?[e("q-td",{key:"bound_code",attrs:{props:a}},[t._v(t._s(a.row.bound_code))])]:t._e(),a.row.id===t.editid?[e("q-td",{key:"bound_code_type",attrs:{props:a}},[e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"单据类型",autofocus:"",options:t.bound_code_type_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.editFormData.bound_code_type,callback:function(e){t.$set(t.editFormData,"bound_code_type",e)},expression:"editFormData.bound_code_type"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"bound_code_type",attrs:{props:a}},[t._v("\n "+t._s(t.bound_code_type_map[a.row.bound_code_type]||a.row.bound_code_type))])]:t._e(),a.row.id===t.editid?[e("q-td",{key:"bound_bs_type",attrs:{props:a}},[e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"单据类型",options:t.bound_bs_type_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.editFormData.bound_bs_type,callback:function(e){t.$set(t.editFormData,"bound_bs_type",e)},expression:"editFormData.bound_bs_type"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"bound_bs_type",attrs:{props:a}},[t._v("\n "+t._s(t.bound_bs_type_map[a.row.bound_bs_type]||a.row.bound_bs_type))])]:t._e(),a.row.id===t.editid?[e("q-td",{key:"bound_desc",attrs:{props:a}},[e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"出入库类别",options:t.bound_desc_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.editFormData.bound_desc,callback:function(e){t.$set(t.editFormData,"bound_desc",e)},expression:"editFormData.bound_desc"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"bound_desc",attrs:{props:a}},[t._v("\n "+t._s(t.bound_desc_map[a.row.bound_desc]||a.row.bound_desc))])]:t._e(),a.row.id===t.editid?[e("q-td",{key:"bound_department",attrs:{props:a}},[e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"部门",options:t.bound_department_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.editFormData.bound_department,callback:function(e){t.$set(t.editFormData,"bound_department",e)},expression:"editFormData.bound_department"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"bound_department",attrs:{props:a}},[t._v("\n "+t._s(t.bound_department_map[a.row.bound_department]||a.row.bound_department))])]:t._e(),a.row.id===t.editid?[e("q-td",{key:"creater",attrs:{props:a}},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"经办人",rules:[e=>e&&e>0||t.error1]},model:{value:t.editFormData.creater,callback:function(e){t.$set(t.editFormData,"creater",t._n(e))},expression:"editFormData.creater"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"creater",attrs:{props:a}},[t._v(t._s(a.row.creater))])]:t._e(),a.row.id===t.editid||a.row.id!==t.editid?[e("q-td",{key:"bound_status",attrs:{props:a}},[t._v("\n "+t._s(t.bound_status_map[a.row.bound_status]||a.row.bound_status))])]:t._e(),t.editMode?t.editMode?[a.row.id===t.editid?[e("q-td",{key:"action",staticStyle:{width:"100px"},attrs:{props:a}},[e("q-btn",{attrs:{round:"",flat:"",push:"",color:"secondary",icon:"check"},on:{click:function(e){return t.editDataSubmit()}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v(t._s(t.$t("confirmedit")))])],1),e("q-btn",{attrs:{round:"",flat:"",push:"",color:"red",icon:"close"},on:{click:function(e){return t.editDataCancel()}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v(t._s(t.$t("canceledit")))])],1)],1)]:a.row.id!==t.editid?void 0:t._e()]:t._e():[e("q-td",{key:"action",staticStyle:{width:"100px"},attrs:{props:a}},[e("q-btn",{attrs:{round:"",flat:"",push:"",color:"dark",icon:"trolley"},on:{click:function(e){return t.change_status(a.row)}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v("确认出库")])],1),e("q-btn",{attrs:{round:"",flat:"",push:"",color:"dark",icon:"delete"},on:{click:function(e){return t.deleteData(a.row.id)}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v(t._s(t.$t("delete")))])],1)],1)]],2)]}}])})],1),[e("div",{directives:[{name:"show",rawName:"v-show",value:0!==t.max,expression:"max !== 0"}],staticClass:"q-pa-lg flex flex-center"},[e("div",[t._v(t._s(t.total))]),e("q-pagination",{attrs:{color:"black",max:t.max,"max-pages":6,"boundary-links":""},on:{click:function(e){t.getSearchList(t.current),t.paginationIpt=t.current}},model:{value:t.current,callback:function(e){t.current=e},expression:"current"}}),e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.paginationIpt,expression:"paginationIpt"}],staticStyle:{width:"60px","text-align":"center"},domProps:{value:t.paginationIpt},on:{blur:t.changePageEnter,keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.changePageEnter.apply(null,arguments)},input:function(e){e.target.composing||(t.paginationIpt=e.target.value)}}})])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:0===t.max,expression:"max === 0"}],staticClass:"q-pa-lg flex flex-center"},[e("q-btn",{attrs:{flat:"",push:"",color:"dark",label:t.$t("no_data")}})],1)],e("q-dialog",{model:{value:t.newForm,callback:function(e){t.newForm=e},expression:"newForm"}},[e("q-card",{staticClass:"shadow-24"},[e("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[e("div",[t._v(t._s(t.$t("newtip")))]),e("q-space"),e("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4"}},[t._v(t._s(t.$t("index.close")))])],1)],1),e("q-card-section",{staticClass:"scroll",staticStyle:{"max-height":"325px",width:"400px"}},[e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"单据类型",autofocus:"",options:t.bound_code_type_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.newFormData.bound_code_type,callback:function(e){t.$set(t.newFormData,"bound_code_type",e)},expression:"newFormData.bound_code_type"}}),e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"业务类型",options:t.bound_bs_type_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.newFormData.bound_bs_type,callback:function(e){t.$set(t.newFormData,"bound_bs_type",e)},expression:"newFormData.bound_bs_type"}}),e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"出入库类别",options:t.bound_desc_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.newFormData.bound_desc,callback:function(e){t.$set(t.newFormData,"bound_desc",e)},expression:"newFormData.bound_desc"}}),e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"部门",options:t.bound_department_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.newFormData.bound_department,callback:function(e){t.$set(t.newFormData,"bound_department",e)},expression:"newFormData.bound_department"}}),e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"经办人",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.newFormData.creater,callback:function(e){t.$set(t.newFormData,"creater",e)},expression:"newFormData.creater"}})],1),e("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[e("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(e){return t.newDataCancel()}}},[t._v(t._s(t.$t("cancel")))]),e("q-btn",{attrs:{color:"primary"},on:{click:function(e){return t.newDataSubmit()}}},[t._v(t._s(t.$t("submit")))])],1)],1)],1),e("q-dialog",{model:{value:t.deleteForm,callback:function(e){t.deleteForm=e},expression:"deleteForm"}},[e("q-card",{staticClass:"shadow-24"},[e("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[e("div",[t._v(t._s(t.$t("delete")))]),e("q-space"),e("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[e("q-tooltip",[t._v(t._s(t.$t("index.close")))])],1)],1),e("q-card-section",{staticClass:"scroll",staticStyle:{"min-height":"325px",width:"550px"}},[t._v(t._s(t.$t("deletetip")))]),e("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[e("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(e){return t.deleteDataCancel()}}},[t._v(t._s(t.$t("cancel")))]),e("q-btn",{attrs:{color:"primary"},on:{click:function(e){return t.deleteDataSubmit()}}},[t._v(t._s(t.$t("submit")))])],1)],1)],1),e("q-dialog",{model:{value:t.newBatchForm,callback:function(e){t.newBatchForm=e},expression:"newBatchForm"}},[e("q-card",{staticClass:"shadow-24",staticStyle:{"min-width":"800px"}},[e("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[e("div",[t._v(t._s("新建出库批次"))]),e("q-space"),e("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4"}},[t._v(t._s(t.$t("index.close")))])],1)],1),e("q-card-section",{staticClass:"scroll",staticStyle:{"min-height":"325px",width:"800px"}},[e("div",{staticClass:"text-h6 q-mb-md"},[t._v("\n "+t._s("目标批次信息")+"\n "),e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"出库方式",options:t.out_type_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.newBatchFormData.out_type,callback:function(e){t.$set(t.newBatchFormData,"out_type",e)},expression:"newBatchFormData.out_type"}}),e("div",{staticStyle:{"margin-left":"-10px"}},[e("q-card",{staticClass:"q-pa-md"},[e("div",{staticClass:"q-mb-md"},[e("div",{staticClass:"row"},[e("q-btn",{attrs:{label:"添加条件",icon:"add",color:"primary"},on:{click:t.addCondition}}),e("q-btn",{staticClass:"q-ml-md",attrs:{label:"显示条件"},on:{click:function(e){t.showConditions=!t.showConditions}}}),e("q-select",{staticClass:"q-ml-md",staticStyle:{width:"100px"},attrs:{options:["AND","OR"],dense:""},model:{value:t.logicOperator,callback:function(e){t.logicOperator=e},expression:"logicOperator"}}),e("q-space"),e("q-btn",{staticClass:"q-ml-md",attrs:{label:"重置"},on:{click:t.resetConditions}}),e("q-btn",{attrs:{label:"执行查询",color:"primary"},on:{click:t.getProductSearchList}})],1)]),e("draggable",{attrs:{list:t.conditions,handle:".handle"}},t._l(t.conditions,(function(a,o){return e("div",{key:a.id,staticClass:"row q-gutter-sm q-mb-md"},[e("q-icon",{staticClass:"handle text-grey-6",attrs:{name:"drag_indicator",size:"24px"}}),e("q-select",{staticStyle:{"min-width":"160px"},attrs:{options:t.fieldOptions,label:"字段",dense:"","emit-value":"","map-options":""},model:{value:a.field,callback:function(e){t.$set(a,"field",e)},expression:"condition.field"}}),e("q-select",{staticStyle:{"min-width":"130px"},attrs:{options:t.operatorOptions(a.field),label:"条件",dense:"","emit-value":"","map-options":""},model:{value:a.operator,callback:function(e){t.$set(a,"operator",e)},expression:"condition.operator"}}),"create_time"!==a.field?e(t.inputComponent(a.field),{tag:"component",staticClass:"col",model:{value:a.value,callback:function(e){t.$set(a,"value",e)},expression:"condition.value"}}):[e("div",{staticClass:"row q-gutter-xs"},[e("q-select",{attrs:{options:t.yearOptions,label:"年",dense:"","emit-value":""},on:{input:function(e){return t.handleDateChange(a)}},model:{value:a.year,callback:function(e){t.$set(a,"year",e)},expression:"condition.year"}}),e("q-select",{attrs:{options:t.monthOptions,label:"月",dense:"","emit-value":"",disable:!a.year},on:{input:function(e){return t.handleDateChange(a)}},model:{value:a.month,callback:function(e){t.$set(a,"month",e)},expression:"condition.month"}}),e("q-select",{attrs:{options:t.dayOptions(a.year,a.month),label:"日",dense:"","emit-value":"",disable:!a.month},on:{input:function(e){return t.handleDateChange(a)}},model:{value:a.day,callback:function(e){t.$set(a,"day",e)},expression:"condition.day"}})],1)],e("q-btn",{attrs:{flat:"",round:"",icon:"delete",color:"negative"},on:{click:function(e){return t.removeCondition(o)}}})],2)})),0),e("div",{staticClass:"row q-gutter-x-md"},[e("div",{staticClass:"col column q-gutter-y-md"},[e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"管理批次",options:t.product_list,"option-label":"value","option-value":"value","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale"},model:{value:t.target_batch,callback:function(e){t.target_batch=e},expression:"target_batch"}})],1),e("div",{staticClass:"col column q-gutter-y-md"},[e("q-select",{attrs:{dense:"",outlined:"",square:"",label:"物料",options:t.product_list,"option-label":"label","option-value":"value","emit-value":"","map-options":"",readonly:!1,"transition-show":"scale","transition-hide":"scale",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.target_batch,callback:function(e){t.target_batch=e},expression:"target_batch"}})],1)]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.showConditions,expression:"showConditions"}],staticClass:"q-mt-lg"},[e("q-card",{attrs:{flat:"",bordered:""}},[e("q-card-section",[e("div",{staticClass:"text-caption"},[t._v("生成查询条件:")]),e("pre",[t._v(t._s(t.generatedQuery))])]),e("q-card-actions",{attrs:{align:"right"}})],1)],1)],1)],1),e("div",{staticClass:"q-mb-md"},[t._v("\n "+t._s("已有批次信息")+"\n "),e("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[e("q-btn",{attrs:{color:"primary"},on:{click:function(e){return t.get_refresh_data()}}},[t._v(t._s("刷新"))])],1)]),e("q-card",{staticClass:"q-mb-md",attrs:{bordered:""}},[e("q-card-section",{staticClass:"q-pt-md"},[e("div",{staticClass:"row q-gutter-x-md"},[e("div",{staticClass:"col column q-gutter-y-md"},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"单重",type:"number",readonly:!0},model:{value:t.newBatchFormData.goods_weight,callback:function(e){t.$set(t.newBatchFormData,"goods_weight",t._n(e))},expression:"newBatchFormData.goods_weight"}}),e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"当前数量",type:"number",readonly:!0},model:{value:t.newBatchFormData.goods_qty,callback:function(e){t.$set(t.newBatchFormData,"goods_qty",t._n(e))},expression:"newBatchFormData.goods_qty"}})],1),e("div",{staticClass:"col column q-gutter-y-md"},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"单位",readonly:!0},model:{value:t.newBatchFormData.goods_unit,callback:function(e){t.$set(t.newBatchFormData,"goods_unit",e)},expression:"newBatchFormData.goods_unit"}}),e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"规格/备注",readonly:!0},model:{value:t.newBatchFormData.goods_std,callback:function(e){t.$set(t.newBatchFormData,"goods_std",e)},expression:"newBatchFormData.goods_std"}})],1)])])],1)],1),e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"名称"},model:{value:t.newBatchFormData.goods_desc,callback:function(e){t.$set(t.newBatchFormData,"goods_desc",e)},expression:"newBatchFormData.goods_desc"}}),e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"出库数量",type:"number",rules:[e=>e&&e>0||t.error1]},model:{value:t.newBatchFormData.goods_out_qty,callback:function(e){t.$set(t.newBatchFormData,"goods_out_qty",t._n(e))},expression:"newBatchFormData.goods_out_qty"}}),e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"经办人",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.newBatchFormData.creater,callback:function(e){t.$set(t.newBatchFormData,"creater",e)},expression:"newBatchFormData.creater"}})],1),e("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[e("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(e){return t.newBatchCancel()}}},[t._v(t._s(t.$t("cancel")))]),e("q-btn",{attrs:{color:"primary"},on:{click:function(e){return t.newBatchSubmit()}}},[t._v(t._s(t.$t("submit")))])],1)],1)],1),e("q-dialog",{attrs:{"transition-show":"jump-down","transition-hide":"jump-up"},model:{value:t.detailForm,callback:function(e){t.detailForm=e},expression:"detailForm"}},[e("q-card",{staticStyle:{"min-width":"900px"}},[e("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[e("div",[t._v("\n "+t._s("出库信息")+"\n ")]),e("q-space"),e("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[20,20],"content-style":"font-size: 12px"}},[t._v("\n "+t._s(t.$t("index.close")))])],1)],1),e("q-card-section",{staticClass:"q-pt-md"},[e("q-tabs",{model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("q-tab",{attrs:{name:"tab1",label:"出库信息"}})],1)],1),e("q-tab-panels",{attrs:{animated:""},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("q-tab-panel",{staticStyle:{height:"70px"},attrs:{name:"tab1"}},[e("div",{staticClass:"row q-gutter-x-md"},[e("div",{staticClass:"col column q-gutter-y-md"},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"单据时间",readonly:!0},model:{value:t.table_detail.bound_date,callback:function(e){t.$set(t.table_detail,"bound_date",e)},expression:"table_detail.bound_date"}})],1),e("div",{staticClass:"col column q-gutter-y-md"},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"单据编码",readonly:!0},model:{value:t.table_detail.bound_code,callback:function(e){t.$set(t.table_detail,"bound_code",e)},expression:"table_detail.bound_code"}})],1)])])],1),e("div",{staticStyle:{float:"right",padding:"15px 15px 50px 15px","min-width":"100%"},attrs:{flow:"row wrap"}},[e("q-card",{staticClass:"q-mb-md",attrs:{bordered:""}},[e("q-card-actions",{staticClass:"q-px-none",staticStyle:{position:"absolute",right:"20px",top:"10px","z-index":"100"}},[e("q-btn",{attrs:{icon:"add",flat:"",dense:"",color:"primary",label:t.$t("stock.add")},on:{click:function(e){return t.addbatch()}}})],1),e("q-card-section",[[e("div",{staticClass:"text-h6 q-mb-md"},[t._v(t._s("批次信息"))]),t.batch_detail.length>0?t._l(t.batch_detail,(function(a,o){return e("div",{key:o,staticClass:"row q-col-gutter-md q-mb-sm"},[e("div",{staticClass:"col",staticStyle:{"min-width":"150px"}},[e("q-input",{attrs:{label:"批次",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.bound_batch.out_number,callback:function(e){t.$set(a.bound_batch,"out_number",e)},expression:"item.bound_batch.out_number"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"货物",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.bound_batch.goods_desc,callback:function(e){t.$set(a.bound_batch,"goods_desc",e)},expression:"item.bound_batch.goods_desc"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"单重",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.bound_batch.goods_weight,callback:function(e){t.$set(a.bound_batch,"goods_weight",e)},expression:"item.bound_batch.goods_weight"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"出库数量",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.bound_batch.goods_out_qty,callback:function(e){t.$set(a.bound_batch,"goods_out_qty",e)},expression:"item.bound_batch.goods_out_qty"}})],1)])})):t._e()]],2)],1)],1)],1)],1)],2)},n=[],s=(a("ddb0"),a("9861"),a("a79d"),a("5319"),a("3004")),i=a("b76a"),l=a.n(i),r=a("bd4c"),d=a("a357"),c=a("18d6"),u={name:"Pagednlist",components:{draggable:l.a},data(){return{showConditions:!1,year:null,month:null,day:null,dateStr:"",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:[],out_type_list:[{label:"销售出库",value:"0"},{label:"其他出库",value:"4"}],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"}],filter:"",product_filter:"",pagination:{page:1,rowsPerPage:11},newForm:!1,newBatchForm:!1,newFormData:{},newBatchFormData:{goods_code:"",goods_desc:"",goods_weight:0,goods_qty:0,goods_unit:"",goods_out_qty:0,creater:"",out_number:"",out_type:"0",goods_std:"",goods_batch:""},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",target_batch:"",target_goods_desc:"",conditions:[],logicOperator:"AND",fieldOptions:[{label:"物料编码",value:"goods_code"},{label:"物料名称",value:"goods_desc"},{label:"库存数量",value:"goods_in_location_qty"}],operatorMap:{default:[{label:"等于",value:"eq"},{label:"包含",value:"contains"}],goods_in_location_qty:[{label:"大于",value:"gt"},{label:"等于",value:"eq"},{label:"小于",value:"lt"}],create_time:[{label:"之前",value:"lte"},{label:"之后",value:"gte"}]}}},computed:{yearOptions(){const t=(new Date).getFullYear();return Array.from({length:5},((e,a)=>t-a))},monthOptions(){return Array.from({length:12},((t,e)=>({label:`${e+1}月`,value:e+1})))},interval(){return this.$t("download_center.start")+" - "+this.$t("download_center.end")},generatedQuery(){return this.conditions.map((t=>{const e={eq:"",contains:"__icontains",gt:"__gt",lt:"__lt",gte:"__gte",lte:"__lte"}[t.operator];return`${t.field}${e}=${t.value}`})).join(` ${this.logicOperator} `)},inputComponent(){return function(t){const e={goods_code:"q-input",goods_desc:"q-input",bound_number:"q-input",sourced_number:"q-input",goods_in_location_qty:"q-input"};return e[t]||"q-input"}}},methods:{dayOptions(t,e){if(!t||!e)return[];const a=new Date(t,e,0).getDate();return Array.from({length:a},((t,e)=>e+1))},handleDateChange(t){console.log("当前条件:",t.value),t.year&&t.month&&t.day?t.value=`${t.year}-${this.pad(t.month)}-${this.pad(t.day)}`:t.year&&t.month?t.value=`${t.year}-${this.pad(t.month)}`:t.year&&(t.value=`${t.year}`)},pad(t){return t.toString().padStart(2,"0")},operatorOptions(t){return this.operatorMap[t]||this.operatorMap.default},addCondition(){this.conditions.push({id:Date.now(),field:"goods_desc",operator:"eq",value:"",year:null,month:null,day:null})},removeCondition(t){this.conditions.splice(t,1)},resetConditions(){this.conditions=[],this.newBatchFormData.goods_code="",this.newBatchFormData.goods_desc="",this.newBatchFormData.goods_weight=0,this.newBatchFormData.goods_qty=0,this.newBatchFormData.goods_unit="",this.newBatchFormData.goods_out_qty=0,this.newBatchFormData.creater="",this.newBatchFormData.out_number="",this.newBatchFormData.out_type="0",this.newBatchFormData.goods_std="",this.newBatchFormData.goods_batch=""},getList(t={}){var e=this;e.loading=!0;const a={page:e.current,base_type:"1",page_size:e.pagination.rowsPerPage},o=new URLSearchParams({...a,...t});console.log(o),Array.from(o.entries()).forEach((([t,e])=>{""!==e&&null!==e&&void 0!==e||o.delete(t)})),Object(s["e"])(`${e.pathname}?${o}`).then((t=>{e.table_list=t.results,e.total=t.count,e.max=Math.ceil(t.count/e.pagination.rowsPerPage)||0,e.pathname_previous=t.previous,e.pathname_next=t.next})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})).finally((()=>{e.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)},get_refresh_data(){Object(s["e"])("bound/batch/?bound_number="+this.target_batch).then((t=>{console.log("当前长度",t.results.length),console.log("当前值",t.results[0]),t.results.length>0?(this.newBatchFormData.goods_qty=t.results[0].goods_qty,console.log("当前数目",this.newBatchFormData.goods_qty),this.newBatchFormData.goods_weight=t.results[0].goods_weight,this.newBatchFormData.goods_std=t.results[0].goods_std,this.newBatchFormData.goods_unit=t.results[0].goods_unit):(this.newBatchFormData.goods_qty="",this.newBatchFormData.goods_weight="",this.newBatchFormData.goods_std="",this.newBatchFormData.goods_unit="")})).catch((t=>{this.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},getProductSearchList(){const t=this;t.loading=!0;const e={max_page:1e3},a=new URLSearchParams(t.generatedQuery),o=Object.fromEntries(a.entries()),n={...e,...o},i=new URLSearchParams(Object.entries(n).filter((([t,e])=>null!==e&&void 0!==e&&""!==e))).toString();console.log("查询参数",i),Object(s["e"])(`bound/batch/count/?${i}`).then((e=>{t.product_list=e.results.map((t=>({label:t.goods_desc,value:t.goods_code}))),t.product_map=e.results.reduce(((t,e)=>(t[e.goods_code]=e.goods_desc,t)),{})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})).finally((()=>{t.loading=!1}))},getSearchList(t=1){this.current=t,this.paginationIpt=t,this.getList({goods_desc__icontains:this.filter,document_date__range:this.date_range})},downloadlistData(){this.getfileList()},getfileList(){var t=this;t.loading=!0;const e={goods_desc__icontains:t.filter,document_date__range:t.date_range},a=new URLSearchParams({...e});console.log(a),Array.from(a.entries()).forEach((([t,e])=>{""!==e&&null!==e&&void 0!==e||a.delete(t)})),console.log(`${t.pathfilename}?${a}`),Object(s["e"])(`${t.pathfilename}?${a}`).then((e=>{var a=Date.now(),o=r["b"].formatDate(a,"YYYYMMDDHHmmss");const n=Object(d["a"])(t.pathfilename+"list"+o+".csv","\ufeff"+e,"text/csv");!0!==n&&t.$q.notify({message:"Browser denied file download...",color:"negative",icon:"warning"})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})).finally((()=>{t.loading=!1}))},getListPrevious(){var t=this;c["a"].has("auth")&&Object(s["e"])(t.pathname_previous,{}).then((e=>{t.table_list=e.results,t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},getListNext(){var t=this;c["a"].has("auth")&&Object(s["e"])(t.pathname_next,{}).then((e=>{t.table_list=e.results,t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},reFresh(){var t=this;t.getSearchList()},newDataSubmit(){var t=this;t.newFormData.bound_type="out",t.newFormData.openid=t.openid,t.newFormData.base_type=1,Object(s["h"])(t.pathname,t.newFormData).then((e=>{t.getSearchList(),t.newDataCancel(),500!==e.status_code&&t.$q.notify({message:"成功新增数据",icon:"check",color:"green"})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},newBatchSubmit(){var t=this;t.newBatchFormData.openid=t.openid,t.newBatchFormData.warehouse_code=t.warehouse_code,t.newBatchFormData.warehouse_name=t.warehouse_name,Object(s["h"])("bound/outbatch/",t.newBatchFormData).then((t=>{t.status_code})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})),Object(s["e"])("bound/batch/?bound_number="+this.target_batch).then((t=>{console.log("当前长度",t.results.length),console.log("当前值",t.results[0]),t.results.length>0?(this.newBatchFormData.goods_qty=t.results[0].goods_qty,console.log("当前数目",this.newBatchFormData.goods_qty),this.newBatchFormData.goods_weight=t.results[0].goods_weight,this.newBatchFormData.goods_std=t.results[0].goods_std,this.newBatchFormData.goods_unit=t.results[0].goods_unit):(this.newBatchFormData.goods_qty="",this.newBatchFormData.goods_weight="",this.newBatchFormData.goods_std="",this.newBatchFormData.goods_unit="")})).catch((t=>{this.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},newDataCancel(){var t=this;t.newForm=!1,t.newFormData={bound_code_type:"",bound_bs_type:"",bound_desc:"",bound_department:"",creater:""}},addbatch(){var t=this;t.newBatchForm=!0,this.newBatchFormData.goods_code="",this.newBatchFormData.goods_desc="",this.newBatchFormData.goods_weight=0,this.newBatchFormData.goods_qty=0,this.newBatchFormData.goods_unit="",this.newBatchFormData.goods_out_qty=0,this.newBatchFormData.creater=t.login_name,this.newBatchFormData.out_number="",this.newBatchFormData.out_type="0",this.newBatchFormData.goods_std="",this.newBatchFormData.goods_batch=""},editData(t){var e=this;e.editMode=!0,e.editid=t.id,e.editFormData={bound_date:t.bound_date,bound_code:t.bound_code,bound_code_type:t.bound_code_type,bound_bs_type:t.bound_bs_type,bound_desc:t.bound_desc,bound_department:t.bound_department,creater:e.login_name}},change_status(t){var e=this,a={bound_list_id:t.id};Object(s["h"])("container/out_task/",a).then((t=>{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"})}))},editDataSubmit(){var t=this;t.editFormData.bound_type="in",Object(s["i"])(t.pathname+t.editid+"/",t.editFormData).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"})}))},editDataCancel(){var t=this;t.editMode=!1,t.editid=0,t.editFormData={bound_date:"",bound_code:"",bound_code_type:"",bound_bs_type:"",bound_desc:"",bound_department:"",creater:""}},deleteData(t){var e=this;e.deleteForm=!0,e.deleteid=t},detailData(t){var e=this;e.detailForm=!0,e.detailid=t.id,console.log("detail查询的id是:",e.detailid),Object(s["e"])(e.pathname+e.detailid+"/").then((t=>{e.table_detail=t})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),console.log("detail查询的结果是:",e.table_detail),Object(s["e"])("bound/outdetail/?bound_list="+e.detailid).then((t=>{e.batch_detail=t.results})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},deleteDataSubmit(){var t=this;Object(s["c"])(t.pathname+t.deleteid+"/").then((e=>{t.deleteDataCancel(),t.getSearchList(),t.$q.notify({message:"成功删除数据",icon:"check",color:"green"})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},deleteDataCancel(){var t=this;t.deleteForm=!1,t.deleteid=0},updateProxy(){var t=this;t.proxyDate=t.date}},created(){var t=this;if(c["a"].has("openid")?t.openid=c["a"].getItem("openid"):(t.openid="",c["a"].set("openid","")),c["a"].has("warehouse_code")&&(t.warehouse_code=c["a"].getItem("warehouse_code")),c["a"].has("warehouse_name")&&(t.warehouse_name=c["a"].getItem("warehouse_name")),c["a"].has("login_name")?t.login_name=c["a"].getItem("login_name"):(t.login_name="",c["a"].set("login_name","")),c["a"].has("auth")){const e=Date.now(),a=r["b"].formatDate(e,"YYYY/MM/DD");t.date=a,console.log(t.date),t.authin="1",t.getList()}else t.authin="0";Object(s["e"])("warehouse/boundcodetype/",{}).then((e=>{t.bound_code_type_list=e.results.map((t=>({label:t.bound_code_type_name,value:t.bound_code_type_code}))),t.bound_code_type_map=e.results.reduce(((t,e)=>(t[e.bound_code_type_code]=e.bound_code_type_name,t)),{})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})),Object(s["e"])("warehouse/boundtype/",{}).then((e=>{t.bound_desc_list=e.results.map((t=>({label:t.bound_type_name,value:t.bound_type_code}))),t.bound_desc_map=e.results.reduce(((t,e)=>(t[e.bound_type_code]=e.bound_type_name,t)),{})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})),Object(s["e"])("warehouse/department/",{}).then((e=>{t.bound_department_list=e.results.map((t=>({label:t.department_name,value:t.department_code}))),t.bound_department_map=e.results.reduce(((t,e)=>(t[e.department_code]=e.department_name,t)),{})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})),Object(s["e"])("warehouse/boundbusiness/",{}).then((e=>{t.bound_bs_type_list=e.results.map((t=>({label:t.bound_bs_name,value:t.bound_bs_code}))),t.bound_bs_type_map=e.results.reduce(((t,e)=>(t[e.bound_bs_code]=e.bound_bs_name,t)),{})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})),Object(s["e"])("warehouse/status/",{}).then((e=>{t.bound_status_list=e.results.map((t=>({label:t.bound_status_name,value:t.bound_status_code}))),t.bound_status_map=e.results.reduce(((t,e)=>(t[e.bound_status_code]=e.bound_status_name,t)),{})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},mounted(){var t=this;t.$q.platform.is.electron?t.height=String(t.$q.screen.height-290)+"px":t.height=t.$q.screen.height-290+"px",t.newFormData.creater=t.login_name},updated(){},destroyed(){},watch:{target_batch(t){t?(this.newBatchFormData.goods_code=t.split("-")[0],this.newBatchFormData.out_number=t,this.newBatchFormData.goods_desc=this.product_map[t]):(this.newBatchFormData.goods_code="",this.newBatchFormData.out_number="",this.newBatchFormData.goods_desc=""),Object(s["e"])("bound/batch/?bound_number="+t).then((t=>{console.log("当前长度",t.results.length),console.log("当前值",t.results[0]),t.results.length>0?(this.newBatchFormData.goods_qty=t.results[0].goods_qty,console.log("当前数目",this.newBatchFormData.goods_qty),this.newBatchFormData.goods_weight=t.results[0].goods_weight,this.newBatchFormData.goods_std=t.results[0].goods_std,this.newBatchFormData.goods_unit=t.results[0].goods_unit):(this.newBatchFormData.goods_qty="",this.newBatchFormData.goods_weight="",this.newBatchFormData.goods_std="",this.newBatchFormData.goods_unit="")})).catch((t=>{this.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},createDate1(t){t?(t.to?(this.createDate2=`${t.from} - ${t.to}`,this.date_range=`${t.from},${t.to} `):(this.createDate2=`${t}`,this.dateArray=t.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())}}},_=u,p=(a("9c58"),a("42e1")),h=a("41462"),b=a("eaac"),m=a("e7a9"),g=a("9c40"),w=a("05c0"),y=a("2c91"),v=a("27f9"),q=a("0016"),f=a("bd08"),D=a("db86"),x=a("ddd8"),F=a("3b16"),k=a("24e8"),$=a("f09f"),B=a("d847"),C=a("a370"),S=a("4b7e"),O=a("429b"),j=a("7460"),L=a("adad"),Q=a("823b"),P=a("52ee"),I=a("8572"),N=a("7f67"),T=a("eebe"),M=a.n(T),A=Object(p["a"])(_,o,n,!1,null,"79f1d61c",null);"function"===typeof h["default"]&&Object(h["default"])(A);e["default"]=A.exports;M()(A,"components",{QTable:b["a"],QBtnGroup:m["a"],QBtn:g["a"],QTooltip:w["a"],QSpace:y["a"],QInput:v["a"],QIcon:q["a"],QTr:f["a"],QTd:D["a"],QSelect:x["a"],QPagination:F["a"],QDialog:k["a"],QCard:$["a"],QBar:B["a"],QCardSection:C["a"],QCardActions:S["a"],QTabs:O["a"],QTab:j["a"],QTabPanels:L["a"],QTabPanel:Q["a"],QDate:P["a"],QField:I["a"]}),M()(A,"directives",{ClosePopup:N["a"]})},"9c58":function(t,e,a){"use strict";a("dbd3")},dbd3:function(t,e,a){},f552:function(t,e){}}]);