mirror of
https://github.com/shawncai/ERP.git
synced 2024-11-14 20:56:32 +08:00
1 line
No EOL
17 KiB
JavaScript
1 line
No EOL
17 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-aa07"],{"1jFp":function(e,t,a){},"8D7Q":function(e,t,a){"use strict";var i=a("Q7sT");a.n(i).a},Q7sT:function(e,t,a){},Wi4F:function(e,t,a){"use strict";var i=a("1jFp");a.n(i).a},pfL7:function(e,t,a){"use strict";a.r(t);var i=a("P2sY"),r=a.n(i),n=a("GAWx"),s=a("ZySA"),o=a("Mz3J"),l=a("7x33"),c=a("Uj27"),d=a("obv8"),u={components:{MyDriver:l.a,MyOut:c.a,MyCreate:d.a},props:{control:{type:Boolean,default:!1},editdata:{type:Object,default:null}},data:function(){return{editVisible:this.control,outperson:!1,drivercontrol:!1,createcontrol:!1,outpersonid:"",driver:"",createid:"",personalForm:this.editdata,personalrules:{sourceNumber:[{required:!0,message:"请输入源单编号",trigger:"blur"}],carNumber:[{required:!0,message:"请输入车辆编号",trigger:"blur"}],outpersonid:[{required:!0,message:"请选择出车人",trigger:"blue"}],outPhone:[{required:!0,message:"请输入出车人电话",trigger:"blur"}],driver:[{required:!0,message:"请选择驾驶员",trigger:"blue"}]}}},watch:{control:function(){this.editVisible=this.control},editdata:function(){this.personalForm=this.editdata,this.outpersonid=this.personalForm.outPersonName,this.driver=this.personalForm.driverName}},methods:{handleEditok:function(){var e=this;console.log(this.personalForm),Object(n.l)(this.personalForm).then(function(t){200===t.data.ret?(e.$notify({title:"操作成功",message:"操作成功",type:"success",duration:1e3,offset:100}),e.$emit("rest",!0),e.$refs.personalForm.clearValidate(),e.$refs.personalForm.resetFields(),e.editVisible=!1):e.$notify.error({title:"错误",message:"出错了",offset:100})})},handlecancel:function(){this.$refs.personalForm.clearValidate(),this.$refs.personalForm.resetFields(),this.editVisible=!1},handleoutperson:function(){this.outperson=!0},outpersonname:function(e){console.log(e),this.outpersonid=e.personName,this.personalForm.outpersonid=e.id},handlechoose:function(){this.drivercontrol=!0},drivername:function(e){this.driver=e.personName,this.personalForm.driver=e.id},handlechoosecreateman:function(){this.createcontrol=!0},createname:function(e){this.createid=e.personName,this.personalForm.createid=e.id}}},p=(a("Wi4F"),a("KHd+")),m=Object(p.a)(u,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{visible:e.editVisible,control:e.control,editdata:e.editdata,"close-on-press-escape":!1,top:"10px",title:"修改物流车辆"},on:{"update:visible":function(t){e.editVisible=t},close:function(t){e.$emit("update:control",!1)}}},[a("h2",{ref:"geren",staticClass:"form-name"},[e._v("基本信息")]),e._v(" "),a("div",{staticClass:"container"},[a("el-form",{ref:"personalForm",staticClass:"demo-ruleForm",staticStyle:{"margin-left":"30px"},attrs:{model:e.personalForm,rules:e.personalrules,inline:!0,"status-icon":"","label-position":"top","label-width":"300px"}},[a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("LogisticsCar.sourcenumber")}},[a("el-input",{attrs:{placeholder:"请输入源单编号",disabled:""},model:{value:e.personalForm.sourceNumber,callback:function(t){e.$set(e.personalForm,"sourceNumber",t)},expression:"personalForm.sourceNumber"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("LogisticsCar.carnumber"),prop:"carNumber"}},[a("el-input",{attrs:{placeholder:"请输入车辆编号",clearable:""},model:{value:e.personalForm.carNumber,callback:function(t){e.$set(e.personalForm,"carNumber",t)},expression:"personalForm.carNumber"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("LogisticsCar.outpersonid"),prop:"outpersonid"}},[a("el-input",{attrs:{placeholder:"请选择出车人"},on:{focus:e.handleoutperson},model:{value:e.outpersonid,callback:function(t){e.outpersonid=t},expression:"outpersonid"}})],1),e._v(" "),a("my-out",{attrs:{outperson:e.outperson},on:{"update:outperson":function(t){e.outperson=t},outpersonname:e.outpersonname}}),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("LogisticsCar.address")}},[a("el-input",{attrs:{placeholder:"请输入送货地点",clearable:""},model:{value:e.personalForm.address,callback:function(t){e.$set(e.personalForm,"address",t)},expression:"personalForm.address"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("LogisticsCar.outphone"),prop:"outPhone"}},[a("el-input",{attrs:{placeholder:"请输入出车人电话",clearable:""},model:{value:e.personalForm.outPhone,callback:function(t){e.$set(e.personalForm,"outPhone",t)},expression:"personalForm.outPhone"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("LogisticsCar.drivers"),prop:"driver"}},[a("el-input",{attrs:{placeholder:"请选择驾驶员",clearable:""},on:{focus:e.handlechoose},model:{value:e.driver,callback:function(t){e.driver=t},expression:"driver"}})],1),e._v(" "),a("my-driver",{attrs:{drivercontrol:e.drivercontrol},on:{"update:drivercontrol":function(t){e.drivercontrol=t},drivername:e.drivername}}),e._v(" "),a("my-create",{attrs:{createcontrol:e.createcontrol},on:{"update:createcontrol":function(t){e.createcontrol=t},createname:e.createname}}),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("LogisticsCar.starttime")}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime",placeholder:"选择出车时间","value-format":"yyyy-MM-dd HH:mm:ss",clearable:""},model:{value:e.personalForm.startTime,callback:function(t){e.$set(e.personalForm,"startTime",t)},expression:"personalForm.startTime"}})],1)],1)],1),e._v(" "),a("div",{staticClass:"buttons",staticStyle:{"margin-top":"20px","margin-left":"30px"}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.handleEditok()}}},[e._v("修改")]),e._v(" "),a("el-button",{attrs:{type:"danger"},on:{click:function(t){e.handlecancel()}}},[e._v("取消")])],1)])},[],!1,null,"3e3e9ad1",null);m.options.__file="MyEdit.vue";var f=m.exports,h={name:"SendcarList",directives:{waves:s.a},components:{Pagination:o.a,MyEdit:f},filters:{carTypeFilter:function(e){return{1:"大货车",2:"小货车",3:"小轿车"}[e]},statFilter:function(e){return{1:"正常",2:"停用"}[e]}},data:function(){return{groupName:"",groupData:[],GroupVisible:!1,moreaction:"",levelIds:[],typeIds:[],downloadLoading:!1,list:[],total:0,tableKey:0,listLoading:!0,getemplist:{pagenum:1,pagesize:10},depts:[],props:{value:"id",label:"regionName",children:"regionListVos"},regions:[],getemplistregions:[],repositories:[],personalForm:{},editVisible:!1}},mounted:function(){this.getlist()},methods:{getlist:function(){var e=this;this.listLoading=!0,Object(n.i)(this.getemplist).then(function(t){200===t.data.ret?(e.list=t.data.data.content.list,e.total=t.data.data.content.totalCount):e.$notify.error({title:"错误",message:"出错了",offset:100}),setTimeout(function(){e.listLoading=!1},50)})},handleFilter:function(){var e=this;this.getemplist.pagenum=1,Object(n.i)(this.getemplist).then(function(t){200===t.data.ret?(e.list=t.data.data.content.list,e.total=t.data.data.content.totalCount):e.$notify.error({title:"错误",message:"出错了",offset:100})})},handleEdit:function(e){console.log(e),this.editVisible=!0,this.personalForm=r()({},e),this.personalForm.carType=String(e.carType),this.personalForm.stat=String(e.stat)},refreshlist:function(e){!0===e&&this.getlist()},handleSelectionChange:function(e){this.moreaction=e},handleCommand:function(e){var t=this,a=this.moreaction.map(function(e){return e.id}).join();"delete"===e&&this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.f)(a).then(function(e){200===e.data.ret?(t.$notify({title:"删除成功",type:"success",offset:100}),t.getlist()):t.$notify.error({title:"错误",message:"出错了",offset:100})})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})},handleDelete:function(e){var t=this;this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.f)(e.id).then(function(e){200===e.data.ret?(t.$notify({title:"删除成功",type:"success",offset:100}),t.getlist()):t.$notify.error({title:"错误",message:"出错了",offset:100})})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})},handleAdd:function(){this.$router.push("/LogisticsCar/Addsendcar")},handleExport:function(){var e=this;this.downloadLoading=!0,Promise.all([a.e("chunk-ef4a"),a.e("chunk-6b3a")]).then(a.bind(null,"S/jZ")).then(function(t){var a=e.formatJson(["id","LogisticsCarName","LogisticsCarShortName","typeName","regionName","buyerName","levelName","createName","createTime"],e.list);t.export_json_to_excel({header:["供应商编号","供应商名称","供应商简称","供应商类别","所在区域","采购员","供应商优质级别","建档人","建档日期"],data:a,filename:"经销商资料表"}),e.downloadLoading=!1})},formatJson:function(e,t){return t.map(function(t){return e.map(function(e){return t[e]})})},handlePrint:function(){console.log(456)}}},v=(a("8D7Q"),Object(p.a)(h,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"ERP-container"},[a("div",{staticClass:"filter-container"},[a("el-input",{staticClass:"filter-item",attrs:{placeholder:e.$t("LogisticsCar.outpersonid"),clearable:""},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleFilter(t):null}},model:{value:e.getemplist.outperson,callback:function(t){e.$set(e.getemplist,"outperson",t)},expression:"getemplist.outperson"}}),e._v(" "),a("el-input",{staticClass:"filter-item",attrs:{placeholder:e.$t("LogisticsCar.carnumber"),clearable:""},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleFilter(t):null}},model:{value:e.getemplist.carnumber,callback:function(t){e.$set(e.getemplist,"carnumber",t)},expression:"getemplist.carnumber"}}),e._v(" "),a("el-input",{staticClass:"filter-item",attrs:{placeholder:e.$t("LogisticsCar.licencenumber"),clearable:""},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleFilter(t):null}},model:{value:e.getemplist.licencenumber,callback:function(t){e.$set(e.getemplist,"licencenumber",t)},expression:"getemplist.licencenumber"}}),e._v(" "),a("el-input",{staticClass:"filter-item",attrs:{placeholder:e.$t("public.address"),clearable:""},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleFilter(t):null}},model:{value:e.getemplist.address,callback:function(t){e.$set(e.getemplist,"address",t)},expression:"getemplist.address"}}),e._v(" "),a("el-popover",{attrs:{placement:"bottom",width:"500",trigger:"click"}},[a("el-select",{staticClass:"filter-item",staticStyle:{width:"40%",float:"left","margin-right":"20px"},attrs:{placeholder:"车辆状态",clearable:""},model:{value:e.getemplist.stat,callback:function(t){e.$set(e.getemplist,"stat",t)},expression:"getemplist.stat"}},[a("el-option",{attrs:{label:"正常",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"停用",value:"2"}})],1),e._v(" "),a("el-date-picker",{staticStyle:{width:"40%",float:"right","margin-right":"20px"},attrs:{type:"datetime",placeholder:"选择出车时间","value-format":"yyyy-MM-dd HH:mm:ss",clearable:""},model:{value:e.getemplist.starttime,callback:function(t){e.$set(e.getemplist,"starttime",t)},expression:"getemplist.starttime"}}),e._v(" "),a("div",{staticClass:"seachbutton",staticStyle:{width:"100%",float:"right","margin-top":"20px"}},[a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{float:"right"},attrs:{type:"primary"},on:{click:e.handleFilter}},[e._v(e._s(e.$t("public.search")))])],1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"130px"},attrs:{slot:"reference",type:"primary"},slot:"reference"},[e._v(e._s(e.$t("public.filter"))),a("svg-icon",{staticStyle:{"margin-left":"4px"},attrs:{"icon-class":"shaixuan"}})],1)],1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"86px"},attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleFilter}},[e._v(e._s(e.$t("public.search")))]),e._v(" "),a("el-dropdown",{on:{command:e.handleCommand}},[a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",attrs:{type:"primary"}},[e._v("\n "+e._s(e.$t("public.batchoperation"))+" "),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),a("el-dropdown-menu",{staticStyle:{width:"140px"},attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{staticStyle:{"text-align":"left"},attrs:{command:"delete"}},[a("svg-icon",{staticStyle:{width:"40px"},attrs:{"icon-class":"shanchu"}}),e._v(e._s(e.$t("public.delete")))],1)],1)],1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"86px"},attrs:{loading:e.downloadLoading},on:{click:e.handleExport}},[a("svg-icon",{attrs:{"icon-class":"daochu"}}),e._v(e._s(e.$t("public.export")))],1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"86px"},attrs:{icon:"el-icon-printer"},on:{click:e.handlePrint}},[e._v(e._s(e.$t("public.print")))]),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"86px",float:"right"},attrs:{icon:"el-icon-plus",type:"success"},on:{click:e.handleAdd}},[e._v(e._s(e.$t("public.add")))])],1),e._v(" "),a("div",{staticClass:"app-container"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,staticStyle:{width:"100%"},attrs:{data:e.list,border:"",fit:"","highlight-current-row":""},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("LogisticsCar.carnumber"),resizable:!1,prop:"carNumber",align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.carNumber))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("LogisticsCar.licencenumber"),resizable:!1,prop:"licenceNumber",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.licenceNumber))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("LogisticsCar.outpersonid"),resizable:!1,prop:"outPersonName",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.outPersonName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("LogisticsCar.starttime"),resizable:!1,prop:"startTime",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.startTime))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("LogisticsCar.address"),resizable:!1,prop:"address",align:"center","min-width":"350"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.address))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("LogisticsCar.stat"),resizable:!1,prop:"stat",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e._f("statFilter")(t.row.stat)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("LogisticsCar.createtime"),resizable:!1,prop:"createTime",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.createTime))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("LogisticsCar.createid"),resizable:!1,prop:"createName",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.createName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("public.actions"),resizable:!1,align:"center",width:"230"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){e.handleEdit(t.row)}}},[e._v(e._s(e.$t("public.edit")))]),e._v(" "),a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){e.handleDelete(t.row)}}},[e._v(e._s(e.$t("public.delete")))])]}}])})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.getemplist.pagenum,limit:e.getemplist.pagesize},on:{"update:page":function(t){e.$set(e.getemplist,"pagenum",t)},"update:limit":function(t){e.$set(e.getemplist,"pagesize",t)},pagination:e.getlist}}),e._v(" "),a("my-edit",{attrs:{control:e.editVisible,editdata:e.personalForm},on:{"update:control":function(t){e.editVisible=t},"update:editdata":function(t){e.personalForm=t},rest:e.refreshlist}})],1)])},[],!1,null,"42c56d03",null));v.options.__file="SendcarList.vue";t.default=v.exports}}]); |