/
home
/
liman
/
panel
/
js
/
File Upload :
llllll
Current File: /home/liman/panel/js/8008.eceb79a7.js
(self["webpackChunkliman"]=self["webpackChunkliman"]||[]).push([[8008],{58557:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return d}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("x-table",{ref:"documentTbl",attrs:{model:t.model},scopedSlots:t._u([{key:"creator__first_name",fn:function(e){var s=e.record;return i("div",{},[t._v(" "+t._s(s.creator__first_name)+" "+t._s(s.creator__last_name)+" ")])}},{key:"operator",fn:function(e){var s=e.record;return i("div",{staticClass:"grid grid-cols-1 md:grid-cols-3 gap-4"},[i("a-tooltip",[i("template",{slot:"title"},[t._v(" نمایش جزئیات ")]),i("span",{on:{click:function(e){return t.toView(s.id)}}},[i("Icon",{staticClass:"size-25 cursor-pointer",attrs:{icon:"ion:list"}})],1)],2),i("a-tooltip",[i("template",{slot:"title"},[t._v(" ویرایش ")]),i("a-popconfirm",{attrs:{title:"آیتم ویرایش شود؟","ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(e){return t.toEdit(s.id)}}},[i("Icon",{class:"size-24 cursor-pointer text-success",attrs:{icon:"ion:create-outline"}})],1)],2),i("a-tooltip",[i("template",{slot:"title"},[t._v(" حذف ")]),i("a-popconfirm",{attrs:{title:"آیتم حذف شود؟","ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(e){return t.deleteItem(s.id)}}},[i("Icon",{class:"size-24 cursor-pointer text-danger",attrs:{icon:"ion:trash-outline"}})],1)],2)],1)}}])}),t.initialValue?i("a-modal",{attrs:{footer:null},model:{value:t.view,callback:function(e){t.view=e},expression:"view"}},[i("a-descriptions",{attrs:{title:"اطلاعات",column:{xxl:3,md:2,xs:1}}},[i("a-descriptions-item",{attrs:{label:"شناسه"}},[t._v(" "+t._s(t.initialValue.id||"-")+" ")]),i("a-descriptions-item",{attrs:{label:"شماره سند"}},[t._v(" "+t._s(t.initialValue.no||"-")+" ")]),i("a-descriptions-item",{attrs:{label:"شماره سند مشتری"}},[t._v(" "+t._s(t.initialValue.c_no||"-")+" ")]),i("a-descriptions-item",{attrs:{label:"ثبت کننده"}},[t._v(" "+t._s(t.initialValue.creator_obj.full_name)+" ")]),i("a-descriptions-item",{attrs:{label:"مشتری"}},[t._v(" "+t._s(t.initialValue.user_obj.full_name)+" ")]),i("a-descriptions-item",{attrs:{label:"سپرده"}},[t._v(" "+t._s(t.initialValue.deposit?"بله":"خیر")+" ")]),i("a-descriptions-item",{attrs:{label:"تایید شده"}},[t._v(" "+t._s(t.initialValue.accepted?"بله":"خیر")+" ")]),i("a-descriptions-item",{attrs:{label:"توضیحات",span:2}},[t._v(" "+t._s(t.initialValue.description||"-")+" ")])],1),i("h4",[t._v("آیتم ها")]),t._l(t.initialValue.items,(function(e){return i("a-descriptions",{key:e.index,staticClass:"mt-4 p-[10px] rounded-[4px] bg-gray-100",attrs:{column:{md:4,xs:1}}},[i("div",{staticClass:"flex",attrs:{slot:"title"},slot:"title"},[t._v(" "+t._s(e.negotiable_obj&&e.negotiable_obj.name?e.negotiable_obj.name:"-")+" ")]),t._l(t.documentRowItems,(function(s,a){return i("a-descriptions-item",{key:a,attrs:{label:s}},[t._v(" "+t._s(e[a])+" ")])}))],2)}))],2):t._e()],1)},a=[],o=i(66790),n=i(11179),l={mixins:[n.Z],name:"documentList",components:{XTable:o.Z},data(){return{documentRowItems:{"account_obj.shaba":"حساب بانکی",negotiable_type:"نوع","product_obj.name":"محصول",weight:"وزن",count:"تعداد","currency_type_obj.name":"نوع ارز",amount:"مقدار",unit_price:"قیمت واحد",name:"نام",cutie:"عیار",account:"حساب بانکی",check_no:"شماره چک",check_date:"تاریخ چک",wage:"عیار",description:"توضیحات"}}}},r=l,c=i(38e3),u=(0,c.Z)(r,s,a,!1,null,null,null),d=u.exports},11179:function(t,e,i){"use strict";e["Z"]={data(){return{initialValue:void 0,model:void 0,view:!1}},computed:{id(){return this.$route.params.id},restfull(){return this.$route.meta.restfull},restfullPath(){return this.$route.meta.restfullPath||this.$route.meta.restfull},customRoute(){return this.$route.meta.isCustomRoute}},async created(){const t=await i(18847)(`./${this.restfull}Tbl`);this.model=t.default,this.id&&!this.customRoute&&await this.getData(),this.initialValue&&this.initialValue.city&&this.initialValue.province&&await this.getCities(this.initialValue.province)},methods:{async getData(t){try{this.$store.commit("setLoading",!0);const{data:e}=await this.$axios.get(`/${this.restfullPath}/${t||this.id}/`);e&&e.city&&e.city.id&&e.city.parent&&e.city.parent.id?this.initialValue=Object.assign(e,{province:e.city.parent.id,city:e.city.id}):this.initialValue=e}catch(e){console.log(e)}finally{this.$store.commit("setLoading",!1)}},async update(t){try{this.$store.commit("setLoading",!0),await this.$axios.patch(`/${this.restfullPath}/${this.id}/`,t),this.$ntSuccess("اطلاعات با موفقیت آپدیت شد"),await this.$router.push({name:`${this.restfull}_list`})}catch(e){console.log(e)}finally{this.$store.commit("setLoading",!1)}},async create(t){try{this.$store.commit("setLoading",!0),await this.$axios.post(`/${this.restfullPath}/`,t),this.$ntSuccess("اطلاعات با موفقیت ثبت شد"),await this.$router.push({name:`${this.restfull}_list`})}catch(e){console.log(e)}finally{this.$store.commit("setLoading",!1)}},toEdit(t){window.open(`/${this.restfull}/edit/${t}`,"_blank").focus()},setInitialValue(t){this.initialValue=t,this.view=!0},async toView(t){await this.getData(t),this.view=!0},async deleteItem(t){try{this.$store.commit("setLoading",!0),await this.$axios.delete(`/${this.restfullPath}/${t}/`),this.$ntSuccess("آیتم با موفقیت حذف شد"),await this.$refs[`${this.restfull}Tbl`].fetch()}catch(e){console.log(e)}finally{this.$store.commit("setLoading",!1)}}}}},18847:function(t,e,i){var s={"./brandTbl":[79989,4660],"./categoryTbl":[22881,2881],"./constantTbl":[77041,7041],"./customerTbl":[61003,1003],"./documentTbl":[1370,1370],"./factorTbl":[13159,3159],"./negotiable-typeTbl":[47429,7429],"./negotiableTbl":[2941,2941],"./orderTbl":[56730,6730],"./porsantTbl":[45693,5693],"./porterTbl":[63685,3685],"./productTbl":[44740,4740],"./sasheTbl":[45868,5868],"./userTbl":[66896,6896]};function a(t){if(!i.o(s,t))return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=s[t],a=e[0];return i.e(e[1]).then((function(){return i(a)}))}a.keys=function(){return Object.keys(s)},a.id=18847,t.exports=a}}]); //# sourceMappingURL=8008.eceb79a7.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure