10.6087e287.js 19 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[10],{2144:function(e,t,a){"use strict";a.r(t);var n=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("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?[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)]: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:"billId",attrs:{props:a}},[e._v(e._s(a.row.billId))])]:e._e(),a.row.id===e.editid||a.row.id!==e.editid?[t("q-td",{key:"number",attrs:{props:a}},[e._v(e._s(a.row.number))])]:e._e(),a.row.id===e.editid?[t("q-td",{key:"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.type,callback:function(t){e.$set(e.editFormData,"type",t)},expression:"editFormData.type"}})],1)]:a.row.id!==e.editid?[t("q-td",{key:"type",attrs:{props:a}},[e._v("\n "+e._s(e.formatBSType(a.row.type)||a.row.type))])]:e._e(),a.row.id===e.editid?[t("q-td",{key:"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.department,callback:function(t){e.$set(e.editFormData,"department",t)},expression:"editFormData.department"}})],1)]:a.row.id!==e.editid?[t("q-td",{key:"department",attrs:{props:a}},[e._v("\n "+e._s(e.bound_department_map[a.row.department]||a.row.department))])]:e._e(),a.row.id===e.editid||a.row.id!==e.editid?[t("q-td",{key:"date",attrs:{props:a}},[e._v(e._s(a.row.date))])]: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.formatStatusType(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",{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":"900px",position:"relative"}},[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.date,callback:function(t){e.$set(e.table_detail,"date",t)},expression:"table_detail.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.number,callback:function(t){e.$set(e.table_detail,"number",t)},expression:"table_detail.number"}})],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-section",[[t("div",{staticClass:"text-h6 q-mb-md"},[e._v(e._s("批次信息"))]),e.batch_detail.length>0?e._l(e.batch_detail,(function(a,n){return t("div",{key:n,staticClass:"row q-col-gutter-md q-mb-sm"},[t("div",{staticClass:"col"},[t("q-input",{attrs:{label:"明细id",readonly:e.onlyread,dense:"",outlined:""},model:{value:a.entryIds,callback:function(t){e.$set(a,"entryIds",t)},expression:"item.entryIds"}})],1),t("div",{staticClass:"col",staticStyle:{"min-width":"150px"}},[t("q-input",{attrs:{label:"批次号",readonly:e.onlyread,dense:"",outlined:""},model:{value:a.production_batch,callback:function(t){e.$set(a,"production_batch",t)},expression:"item.production_batch"}})],1),t("div",{staticClass:"col"},[t("q-input",{attrs:{label:"货物名称",readonly:e.onlyread,dense:"",outlined:""},model:{value:a.goods_name,callback:function(t){e.$set(a,"goods_name",t)},expression:"item.goods_name"}})],1),t("div",{staticClass:"col"},[t("q-input",{attrs:{label:"计划数量",readonly:e.onlyread,dense:"",outlined:""},model:{value:a.plan_qty,callback:function(t){e.$set(a,"plan_qty",t)},expression:"item.plan_qty"}})],1),t("div",{staticClass:"col"},[t("q-input",{attrs:{label:"单位",readonly:e.onlyread,dense:"",outlined:""},model:{value:a.goods_unit,callback:function(t){e.$set(a,"goods_unit",t)},expression:"item.goods_unit"}})],1)])})):e._e()]],2)],1)],1)],1)],1),t("q-dialog",{attrs:{position:"top","transition-show":"scale","transition-hide":"scale"},model:{value:e.confirmForm,callback:function(t){e.confirmForm=t},expression:"confirmForm"}},[t("q-card",{staticClass:"shadow-24"},[t("q-card-section",{staticClass:"scroll",staticStyle:{"max-height":"325px",width:"500px"}},[t("div",{staticClass:"text-h6 q-mb-md"},[e._v(e._s("确认入库单"))]),e._v("\n 确定现场数目与入库汇报"+e._s(e.choose_bill_code)+"单计划数目一致吗?\n ")]),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){e.confirmForm=!1}}},[e._v(e._s(e.$t("cancel")))]),t("q-btn",{attrs:{color:"primary"},on:{click:e.confirm_status}},[e._v(e._s(e.$t("submit")))])],1)],1)],1)],2)},o=[],i=(a("ddb0"),a("9861"),a("a79d"),a("3004")),s=a("bd4c"),r=a("a357"),l=a("18d6"),d={name:"Pageasnlist",data(){return{createDate2:"",date_range:"",proxyDate:"",date:"",goods_code:"",goods_desc:"",openid:"",login_name:"",authin:"0",warehouse_code:"",warehouse_name:"",searchUrl:"",pathname:"wms/inboundBills/",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:[],product_list:[],product_map:[],columns:[{name:"detail",label:"详情",field:"detail",align:"center"},{name:"billId",label:"表单序号",field:"billId",align:"center"},{name:"number",label:"单据编号",field:"number",align:"center"},{name:"type",label:"业务类型",field:"type",align:"center"},{name:"department",label:"部门",field:"department",align:"center"},{name:"date",label:"单据日期",field:"date",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:{},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:!1,bound_batch_list:[],activeTab:"tab1",confirmForm:!1,choose_bill_id:"",choose_bill_code:""}},computed:{interval(){return this.$t("download_center.start")+" - "+this.$t("download_center.end")}},methods:{formatBSType(e){switch(e){case 1:return"生产入库申请";case 2:return"采购入库申请";case 3:return"其他入库";case 4:return"调拨入库";default:return"未知"}},formatStatusType(e){switch(e){case 0:return"待审核";case 1:return"确认无误";case 3:return"其他入库";case 4:return"调拨入库";default:return"未知"}},getList(e={}){var t=this;t.loading=!0;const a={page:t.current,base_type:"0",page_size:t.pagination.rowsPerPage},n=new URLSearchParams({...a,...e});console.log(n),Array.from(n.entries()).forEach((([e,t])=>{""!==t&&null!==t&&void 0!==t||n.delete(e)})),Object(i["e"])(`${t.pathname}?${n}`).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)},getSearchList(e=1){this.current=e,this.paginationIpt=e,this.getList({number__icontains:this.filter,document_date__range:this.date_range})},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(i["e"])(`${e.pathfilename}?${a}`).then((t=>{var a=Date.now(),n=s["b"].formatDate(a,"YYYYMMDDHHmmss");const o=Object(r["a"])(e.pathfilename+"list"+n+".csv","\ufeff"+t,"text/csv");!0!==o&&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;l["a"].has("auth")&&Object(i["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;l["a"].has("auth")&&Object(i["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()},change_status(e){var t=this;t.detailData(e),t.confirmForm=!0,t.choose_bill_id=e.billId,t.choose_bill_code=e.number},confirm_status(){var e=this;e.loading=!0;const t={billId:e.choose_bill_id};Object(i["h"])("wms/generateinbound",t).then((t=>{200==t.code&&e.$q.notify({message:"入库单生成成功,请到入库管理中查看",icon:"check",color:"green"}),400==t.code&&e.$q.notify({message:t.error,icon:"info",color:"info"})})).finally((()=>{e.loading=!1,e.confirmForm=!1,e.getSearchList()}))},detailData(e){var t=this;t.detailForm=!0,t.detailid=e.billId,console.log("detail查询的id是:",t.detailid),Object(i["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(i["e"])("wms/materials/?bound_billId="+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(i["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(l["a"].has("openid")?e.openid=l["a"].getItem("openid"):(e.openid="",l["a"].set("openid","")),l["a"].has("warehouse_code")&&(e.warehouse_code=l["a"].getItem("warehouse_code")),l["a"].has("warehouse_name")&&(e.warehouse_name=l["a"].getItem("warehouse_name")),l["a"].has("login_name")?e.login_name=l["a"].getItem("login_name"):(e.login_name="",l["a"].set("login_name","")),l["a"].has("auth")){const t=Date.now(),a=s["b"].formatDate(t,"YYYY/MM/DD");e.date=a,console.log(e.date),e.authin="1",e.getList()}else e.authin="0";Object(i["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(i["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(i["e"])("warehouse/department/",{}).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(i["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"})}))},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(){}},c=d,u=(a("a116"),a("42e1")),p=a("ee49"),m=a("eaac"),b=a("e7a9"),_=a("9c40"),h=a("05c0"),g=a("2c91"),f=a("27f9"),y=a("0016"),v=a("bd08"),w=a("db86"),q=a("ddd8"),x=a("3b16"),k=a("24e8"),$=a("f09f"),D=a("d847"),F=a("a370"),S=a("429b"),I=a("7460"),C=a("adad"),Q=a("823b"),T=a("52ee"),P=a("8572"),j=a("7f67"),O=a("eebe"),L=a.n(O),N=Object(u["a"])(c,n,o,!1,null,"db707e72",null);"function"===typeof p["default"]&&Object(p["default"])(N);t["default"]=N.exports;L()(N,"components",{QTable:m["a"],QBtnGroup:b["a"],QBtn:_["a"],QTooltip:h["a"],QSpace:g["a"],QInput:f["a"],QIcon:y["a"],QTr:v["a"],QTd:w["a"],QSelect:q["a"],QPagination:x["a"],QDialog:k["a"],QCard:$["a"],QBar:D["a"],QCardSection:F["a"],QTabs:S["a"],QTab:I["a"],QTabPanels:C["a"],QTabPanel:Q["a"],QDate:T["a"],QField:P["a"]}),L()(N,"directives",{ClosePopup:j["a"]})},"76c2":function(e,t,a){},a116:function(e,t,a){"use strict";a("76c2")},c69d:function(e,t){},ee49:function(e,t,a){"use strict";var n=a("c69d"),o=a.n(n);t["default"]=o.a}}]);