fix skit2

This commit is contained in:
fifi97
2021-12-29 00:26:24 +08:00
parent a36340eb10
commit e1d8b64108
5 changed files with 553 additions and 809 deletions
+123 -621
View File
@@ -19207,6 +19207,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var _vue_hero_icons_solid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue-hero-icons/solid */ "./node_modules/@vue-hero-icons/solid/lib/index.es.js");
/* harmony import */ var _util_PetiBesiModal_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/PetiBesiModal.vue */ "./resources/js/components/util/PetiBesiModal.vue");
/* harmony import */ var _pagination_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pagination.vue */ "./resources/js/components/pagination.vue");
//
//
//
@@ -19346,80 +19347,7 @@ __webpack_require__.r(__webpack_exports__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var formatter = new Intl.NumberFormat('en-US', {
@@ -19431,7 +19359,8 @@ var formatter = new Intl.NumberFormat('en-US', {
ChevronRightIcon: _vue_hero_icons_solid__WEBPACK_IMPORTED_MODULE_0__.ChevronRightIcon,
ChevronDoubleLeftIcon: _vue_hero_icons_solid__WEBPACK_IMPORTED_MODULE_0__.ChevronDoubleLeftIcon,
ChevronDoubleRightIcon: _vue_hero_icons_solid__WEBPACK_IMPORTED_MODULE_0__.ChevronDoubleRightIcon,
modal: _util_PetiBesiModal_vue__WEBPACK_IMPORTED_MODULE_1__["default"]
modal: _util_PetiBesiModal_vue__WEBPACK_IMPORTED_MODULE_1__["default"],
pagination: _pagination_vue__WEBPACK_IMPORTED_MODULE_2__["default"]
},
props: {
petibesi: {
@@ -19448,51 +19377,53 @@ var formatter = new Intl.NumberFormat('en-US', {
totalPage: 0,
currentPage: 1,
lastPage: 5,
kodcaw: 'KB2',
showpetibesi: [],
paginate: {},
activePage: 1
};
},
computed: {
active: function active() {
var jumsplit = this.activePage * this.perPage;
var mulaPage = jumsplit - this.perPage;
this.currentPage = mulaPage + 1;
this.lastPage = jumsplit;
var vault = this.petibesi.slice(mulaPage, jumsplit);
return {
vault: vault,
mulaPage: mulaPage,
jumsplit: jumsplit
};
},
rows: function rows() {
this.totalPage = this.$props.petibesi.length;
var totaldibahagi = parseInt(this.totalPage / this.perPage);
return totaldibahagi;
}
created: function created() {
this.getPetibesi(this.currentPage);
},
methods: {
setActive: function setActive(index) {
this.activePage = index + 1;
},
setActiveLastPage: function setActiveLastPage() {
var totaldibahagi = parseInt(this.totalPage / this.perPage);
this.activePage = totaldibahagi;
},
setPrevious: function setPrevious() {
if (this.activePage > 1) this.activePage = this.activePage - 1;
},
setNext: function setNext() {
var totaldibahagi = parseInt(this.totalPage / this.perPage);
if (this.activePage < totaldibahagi) this.activePage = this.activePage + 1;
},
setItem: function setItem(index) {
// Update LTR before changing $data.index
this.$data.leftToRight = index > this.$data.index;
this.$data.index = index;
this.activePage = 1;
// setActive(index){
// this.activePage = index + 1
// },
// setActiveLastPage(){
// let totaldibahagi = parseInt(this.totalPage/this.perPage)
// this.activePage = totaldibahagi
// },
// setPrevious(){
// if(this.activePage > 1)
// this.activePage = this.activePage - 1
// },
// setNext(){
// let totaldibahagi = parseInt(this.totalPage/this.perPage)
// if(this.activePage < totaldibahagi)
// this.activePage = this.activePage + 1
// },
// setItem(index) {
// // Update LTR before changing $data.index
// this.$data.leftToRight = index > this.$data.index;
// this.$data.index = index;
// this.activePage = 1;
// },
getPetibesi: function getPetibesi(pageNumber) {
var _this = this;
this.axios.get('http://localhost:8000/admin/getPetiBesiPaginate/' + this.kodcaw, {
params: {
page: pageNumber
}
}).then(function (response) {
_this.showpetibesi = response.data;
_this.paginate = response.data;
_this.currentPage = pageNumber;
});
},
action: function action(tarikh, kodcaw) {
var _this = this;
var _this2 = this;
axios.get('/api/check/periksapetibesi', {
params: {
@@ -19501,19 +19432,19 @@ var formatter = new Intl.NumberFormat('en-US', {
}
}).then(function (response) {
if (response.data === 'sama') {
_this.$toast("Nilai Tunai sama dengan nilat tunai");
_this2.$toast("Nilai Tunai sama dengan nilat tunai");
} else {
_this.aliranpetibesi = response.data;
_this.$refs.modal.showModal = true;
_this.$refs.modal.tarikh = tarikh;
_this.$refs.modal.kodcaw = kodcaw;
_this.$refs.modal.panjar = formatter.format(_this.aliranpetibesi.panjar);
_this.$refs.modal.bakiawal = formatter.format(_this.aliranpetibesi.bakiawal);
_this.$refs.modal.bakiakhir = formatter.format(_this.aliranpetibesi.bakiakhir);
_this.$refs.modal.pendteller = formatter.format(_this.aliranpetibesi.pendahuluanteller);
_this.$refs.modal.serteller = formatter.format(_this.aliranpetibesi.serahanteller);
_this.$refs.modal.serahan = formatter.format(_this.aliranpetibesi.serahanpkb);
_this.$refs.modal.pendahuluan = formatter.format(_this.aliranpetibesi.pendahuluanpkb);
_this2.aliranpetibesi = response.data;
_this2.$refs.modal.showModal = true;
_this2.$refs.modal.tarikh = tarikh;
_this2.$refs.modal.kodcaw = kodcaw;
_this2.$refs.modal.panjar = formatter.format(_this2.aliranpetibesi.panjar);
_this2.$refs.modal.bakiawal = formatter.format(_this2.aliranpetibesi.bakiawal);
_this2.$refs.modal.bakiakhir = formatter.format(_this2.aliranpetibesi.bakiakhir);
_this2.$refs.modal.pendteller = formatter.format(_this2.aliranpetibesi.pendahuluanteller);
_this2.$refs.modal.serteller = formatter.format(_this2.aliranpetibesi.serahanteller);
_this2.$refs.modal.serahan = formatter.format(_this2.aliranpetibesi.serahanpkb);
_this2.$refs.modal.pendahuluan = formatter.format(_this2.aliranpetibesi.pendahuluanpkb);
}
});
},
@@ -20451,9 +20382,6 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
//
//
//
//
//
//
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
props: {
@@ -20470,7 +20398,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
dropdownShow: false,
param1: "",
arrayCustomer: [],
specCust: []
specCust: [],
nota: ''
};
},
mounted: function mounted() {
@@ -20479,8 +20408,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
beforeDestroy: function beforeDestroy() {
document.removeEventListener('click', this.onClick);
},
created: function created() {
console.log(this.kodcaw);
created: function created() {// console.log('kodcaw',this.kodcaw)
},
methods: {
toggleModal: function toggleModal() {
@@ -20507,7 +20435,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
}]
});
} else {
console.log('siap');
_this.$toast.info("Pelangan tidak dijumpai!");
}
case 3:
@@ -20527,7 +20455,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
if (this.hasNumber(inputvalue)) {
this.axios.get('http://localhost:8000/admin/searchByIC', {
params: {
ic: inputvalue
ic: inputvalue,
kodcaw: this.kodcaw
}
}).then(function (response) {
_this2.arrayCustomer = response.data;
@@ -20537,7 +20466,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
} else {
this.axios.get('http://localhost:8000/admin/searchByName', {
params: {
nama: inputvalue
nama: inputvalue,
kodcaw: this.kodcaw
}
}).then(function (response) {
_this2.arrayCustomer = response.data;
@@ -20551,56 +20481,57 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
return /\d/.test(inputString);
},
onClick: function onClick() {
var isClickInside = this.$refs.popoverDropdownRef.contains(event.target);
var searchInside = this.$refs.btnDropdownRef.contains(event.target);
var buttonSearch = document.getElementById('buttonsearch');
if (this.showModal == true) {
var isClickInside = this.$refs.popoverDropdownRef.contains(event.target);
var searchInside = this.$refs.btnDropdownRef.contains(event.target);
var buttonSearch = document.getElementById('buttonsearch');
if (isClickInside || searchInside || buttonSearch.contains(event.target)) {
if (buttonSearch.value !== '') {
this.dropdownShow = true;
}
} else {
if (this.$refs.btnDropdownRef.value != '') {
this.dropdownShow = false;
if (isClickInside || searchInside || buttonSearch.contains(event.target)) {
if (buttonSearch.value !== '') {
this.dropdownShow = true;
}
} else {
this.dropdownShow = false;
this.arrayCustomer = [];
if (this.$refs.btnDropdownRef.value != '') {
this.dropdownShow = false;
} else {
this.dropdownShow = false;
this.arrayCustomer = [];
}
}
}
},
ClickUrl: function ClickUrl(customer) {
console.log(customer.cust);
var self = this;
this.dropdownShow = false;
this.arrayCustomer.map(function (value, key) {
if (customer.cust == value.id) {
self.specCust = value;
}
});
} // kemaskinifunc: function(){
// // console.log(this.kodcaw + this.kodlaluan + this.tarikh)
// axios.put('/api/check/kemaskinialirantunai',
// {
// kodcaw: this.kodcaw,
// teller: this.kodlaluan,
// tarikh: this.tarikh,
// gadaian: this.gadaian.replace(/[^0-9.-]+/g,""),
// penebusan: this.penebusan.replace(/[^0-9.-]+/g,""),
// bakiakhir: this.bakiakhir.replace(/[^0-9.-]+/g,"")
// }).then(response => {
// if(response.data == 'berjaya')
// {
// this.showModal = false;
// this.$toast.success("Kemaskini Sudah Berjaya!")
// // vm.$forceUpdate();
// this.$emit('clickEvent_', this.pageNumber)
// // setTimeout("window.location.reload()", 3000);
// }else{
// this.showModal = false;
// this.$toast.error("Kemaskini tidak berjaya")
// }
// });
// }
},
kemaskinifunc: function kemaskinifunc() {
var _this3 = this;
axios.post('http://localhost:8000/admin/AddSenaraiHitam', {
kodcaw: this.kodcaw,
nokp: this.specCust.kpbaru ? this.specCust.kpbaru : this.specCust.kplama,
nota: this.nota
}).then(function (response) {
if (response.data == 'berjaya') {
_this3.showModal = false;
_this3.$toast.success("Kemaskini Sudah Berjaya!"); // vm.$forceUpdate();
_this3.$emit('clickEvent_', _this3.pageNumber); // setTimeout("window.location.reload()", 3000);
} else {
_this3.showModal = false;
_this3.$toast.error("Kemaskini tidak berjaya");
}
});
}
}
});
@@ -21330,28 +21261,6 @@ __webpack_require__.r(__webpack_exports__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
@@ -21407,6 +21316,7 @@ __webpack_require__.r(__webpack_exports__);
// let element = this.$refs.modal.$el
// $(element).modal('show')
this.$refs.modal.showModal = true;
this.$refs.modal.kodcaw = this.kodcaw;
}
}
});
@@ -76773,7 +76683,7 @@ var render = function () {
_vm._v(" "),
_c(
"tbody",
_vm._l(_vm.active.vault, function (petibesi, i) {
_vm._l(_vm.showpetibesi.data, function (petibesi, i) {
return _c("tr", { key: i }, [
_c(
"td",
@@ -76787,7 +76697,7 @@ var render = function () {
_c("p", {
staticClass: "text-gray-900 whitespace-no-wrap",
domProps: {
textContent: _vm._s(i + 1 + _vm.active.mulaPage),
textContent: _vm._s(_vm.showpetibesi.from + i),
},
}),
]),
@@ -77029,316 +76939,12 @@ var render = function () {
),
]),
_vm._v(" "),
_c(
"div",
{
staticClass:
"bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6",
},
[
_vm._m(1),
_vm._v(" "),
_c(
"div",
{
staticClass:
"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between",
},
[
_c("div", [
_c(
"p",
{ staticClass: "text-sm text-gray-700" },
[
_vm._v(
"\n Showing\n " +
_vm._s(" ") +
"\n "
),
_c("span", { staticClass: "font-medium" }, [
_vm._v(_vm._s(this.currentPage)),
]),
_vm._v(
"\n " +
_vm._s(" ") +
"\n to\n " +
_vm._s(" ") +
"\n "
),
this.totalPage <= this.perPage
? [
_c("span", { staticClass: "font-medium" }, [
_vm._v(_vm._s(this.totalPage)),
]),
]
: [
_c("span", { staticClass: "font-medium" }, [
_vm._v(_vm._s(this.lastPage)),
]),
],
_vm._v(
"\n " +
_vm._s(" ") +
"\n of\n " +
_vm._s(" ") +
"\n "
),
_c("span", { staticClass: "font-medium" }, [
_vm._v(_vm._s(this.totalPage)),
]),
_vm._v(
"\n " +
_vm._s(" ") +
"\n results\n "
),
],
2
),
]),
_vm._v(" "),
_c("div", [
_c(
"nav",
{
staticClass:
"relative z-0 inline-flex rounded-md shadow-sm -space-x-px",
attrs: { "aria-label": "Pagination" },
},
[
_c(
"a",
{
staticClass:
"relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50",
attrs: { href: "#" },
on: {
click: function ($event) {
return _vm.setActive(0)
},
},
},
[
_c("span", { staticClass: "sr-only" }, [
_vm._v("First Page"),
]),
_vm._v(" "),
_c("ChevronDoubleLeftIcon", {
staticClass: "h-5 w-5",
attrs: { "aria-hidden": "true" },
}),
],
1
),
_vm._v(" "),
_c(
"a",
{
staticClass:
"relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50",
attrs: { href: "#" },
on: {
click: function ($event) {
return _vm.setPrevious()
},
},
},
[
_c("span", { staticClass: "sr-only" }, [
_vm._v("Previous"),
]),
_vm._v(" "),
_c("ChevronLeftIcon", {
staticClass: "h-5 w-5",
attrs: { "aria-hidden": "true" },
}),
],
1
),
_vm._v(" "),
_vm._l(_vm.rows, function (row, i) {
return [
(i + 1 < _vm.activePage &&
i + 1 > _vm.activePage - 2) ||
(i + 1 == 1 && _vm.activePage != 1)
? _c(
"a",
{
key: "Z" + i,
staticClass:
"bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium",
attrs: { href: "#" },
on: {
click: function ($event) {
return _vm.setActive(i)
},
},
},
[
_vm._v(
"\n " +
_vm._s(i + 1) +
"\n "
),
]
)
: _vm._e(),
_vm._v(" "),
_vm.activePage > 3 && i + 1 == 1
? _c(
"span",
{
key: "B" + i,
staticClass:
"relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700",
},
[_vm._v("\n ...\n ")]
)
: _vm._e(),
_vm._v(" "),
i + 1 == _vm.activePage
? _c(
"a",
{
key: i,
staticClass:
"z-10 bg-indigo-50 border-indigo-500 text-indigo-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium",
attrs: {
href: "#",
"aria-current": "page",
},
},
[
_vm._v(
"\n " +
_vm._s(_vm.activePage) +
"\n "
),
]
)
: _vm._e(),
_vm._v(" "),
i + 1 > _vm.activePage &&
i + 1 < _vm.activePage + 3 &&
_vm.activePage != _vm.rows - 1
? _c(
"a",
{
key: "A" + i,
staticClass:
"bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium",
attrs: { href: "#" },
on: {
click: function ($event) {
return _vm.setActive(i)
},
},
},
[
_vm._v(
"\n " +
_vm._s(i + 1) +
"\n "
),
]
)
: _vm._e(),
_vm._v(" "),
i + 1 == _vm.activePage + 3
? _c(
"span",
{
key: "B" + i,
staticClass:
"relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700",
},
[_vm._v("\n ...\n ")]
)
: i + 1 == _vm.rows &&
_vm.activePage != _vm.rows - 1 &&
i + 1 != _vm.rows
? _c(
"a",
{
key: "C" + i,
staticClass:
"bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium",
attrs: { href: "#" },
on: {
click: function ($event) {
return _vm.setActive(i)
},
},
},
[
_vm._v(
"\n " +
_vm._s(i + 1) +
"\n "
),
]
)
: _vm._e(),
]
}),
_vm._v(" "),
_c(
"a",
{
staticClass:
"relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50",
attrs: { href: "#" },
on: {
click: function ($event) {
return _vm.setNext()
},
},
},
[
_c("span", { staticClass: "sr-only" }, [
_vm._v("Next"),
]),
_vm._v(" "),
_c("ChevronRightIcon", {
staticClass: "h-5 w-5",
attrs: { "aria-hidden": "true" },
}),
],
1
),
_vm._v(" "),
_c(
"a",
{
staticClass:
"relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50",
attrs: { href: "#" },
on: {
click: function ($event) {
return _vm.setActiveLastPage()
},
},
},
[
_c("span", { staticClass: "sr-only" }, [
_vm._v("Next"),
]),
_vm._v(" "),
_c("ChevronDoubleRightIcon", {
staticClass: "h-5 w-5",
attrs: { "aria-hidden": "true" },
}),
],
1
),
],
2
),
]),
]
),
]
),
]
_c("pagination", {
attrs: { data: _vm.paginate },
on: { clickEvent_: _vm.getPetibesi },
}),
],
1
),
],
1
@@ -77443,32 +77049,6 @@ var staticRenderFns = [
]),
])
},
function () {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c("div", { staticClass: "flex-1 flex justify-between sm:hidden" }, [
_c(
"a",
{
staticClass:
"relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50",
attrs: { href: "#" },
},
[_vm._v("\n Previous\n ")]
),
_vm._v(" "),
_c(
"a",
{
staticClass:
"ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50",
attrs: { href: "#" },
},
[_vm._v("\n Next\n ")]
),
])
},
]
render._withStripped = true
@@ -78834,8 +78414,9 @@ var render = function () {
{
name: "show",
rawName: "v-show",
value: this.specCust,
expression: "this.specCust",
value: Object.keys(this.specCust).length > 0,
expression:
"Object.keys(this.specCust).length > 0",
},
],
},
@@ -78856,7 +78437,6 @@ var render = function () {
{
staticClass:
"block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2",
attrs: { for: "grid-first-name" },
},
[
_vm._v(
@@ -78867,19 +78447,10 @@ var render = function () {
_vm._v(" "),
_c("input", {
staticClass:
"appearance-none block w-full bg-gray-200 text-gray-700 border border-red-500 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white",
attrs: { name: "nama" },
"appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",
attrs: { readonly: "", name: "nama" },
domProps: { value: this.specCust.nama },
}),
_vm._v(" "),
_c(
"p",
{
staticClass:
"text-red-500 text-xs italic",
},
[_vm._v("Please fill out this field.")]
),
]
),
_vm._v(" "),
@@ -78892,7 +78463,6 @@ var render = function () {
{
staticClass:
"block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2",
attrs: { for: "grid-last-name" },
},
[
_vm._v(
@@ -78904,22 +78474,17 @@ var render = function () {
_c("input", {
staticClass:
"appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",
attrs: { name: "nokp", type: "text" },
attrs: {
readonly: "",
name: "nokp",
type: "text",
},
domProps: {
value: this.specCust.kpbaru
? this.specCust.kpbaru
: this.specCust.kplama,
},
}),
_vm._v(" "),
_c(
"p",
{
staticClass:
"text-red-500 text-xs italic",
},
[_vm._v("Please fill out this field.")]
),
]
),
_vm._v(" "),
@@ -78932,7 +78497,6 @@ var render = function () {
{
staticClass:
"block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2",
attrs: { for: "grid-password" },
},
[
_vm._v(
@@ -78962,15 +78526,6 @@ var render = function () {
},
},
}),
_vm._v(" "),
_c(
"p",
{
staticClass:
"text-red-500 text-xs italic",
},
[_vm._v("Please fill out this field.")]
),
]
),
]
@@ -79007,6 +78562,7 @@ var render = function () {
staticClass:
"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 border border-green-700 rounded",
attrs: { type: "button" },
on: { click: _vm.kemaskinifunc },
},
[_vm._v("\n Daftar\n ")]
),
@@ -80240,7 +79796,7 @@ var render = function () {
"div",
{},
[
_c("modal", { ref: "modal" }),
_c("modal", { ref: "modal", on: { clickEvent_: _vm.getBlacklist } }),
_vm._v(" "),
_c("div", { staticClass: "flex justify-between mb-2" }, [
_c("div", [
@@ -80363,42 +79919,6 @@ var render = function () {
]
),
_vm._v(" "),
_c(
"td",
{
staticClass:
"px-5 py-5 border-b border-gray-200 bg-white text-sm",
},
[
_c("div", { staticClass: "flex items-center" }, [
_c("div", { staticClass: "ml-3" }, [
_c("p", {
staticClass: "text-gray-900 whitespace-no-wrap",
domProps: { textContent: _vm._s(blacklist.teller) },
}),
]),
]),
]
),
_vm._v(" "),
_c(
"td",
{
staticClass:
"px-5 py-5 border-b border-gray-200 bg-white text-sm",
},
[
_c("div", { staticClass: "flex items-center" }, [
_c("div", { staticClass: "ml-3" }, [
_c("p", {
staticClass: "text-gray-900 whitespace-no-wrap",
domProps: { textContent: _vm._s(blacklist.pelulus) },
}),
]),
]),
]
),
_vm._v(" "),
_c(
"td",
{
@@ -80509,24 +80029,6 @@ var staticRenderFns = [
[_vm._v("\n IC\n ")]
),
_vm._v(" "),
_c(
"th",
{
staticClass:
"px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider",
},
[_vm._v("\n Teller\n ")]
),
_vm._v(" "),
_c(
"th",
{
staticClass:
"px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider",
},
[_vm._v("\n Pelulus\n ")]
),
_vm._v(" "),
_c(
"th",
{
+334
View File
@@ -0,0 +1,334 @@
<template>
<div class="container mx-auto px-5 my-10">
<modal ref="modal"></modal>
<article
:key="$data.index"
class="mt-12 lg:mt-16 prose prose-sm lg:prose-lg"
>
<table class="min-w-full leading-normal">
<thead class="text-center">
<tr>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Bil
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Tarikh
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
B/F
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Keluar
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Masuk
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Pendahuluan
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Serahan
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Panjar
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Baki Akhir
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Act
</th>
</tr>
</thead>
<tbody>
<tr v-for="(petibesi,i) in active.vault" :key="i">
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="(i+1+active.mulaPage)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="petibesi.tarikh">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(petibesi.bakiawal)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(petibesi.keluar)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(petibesi.masuk)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(petibesi.pendahuluan)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(petibesi.serahan)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(petibesi.totpanjar)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(petibesi.bakiakhir)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<button @click="action(petibesi.tarikh,petibesi.kodcaw)" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-card-checklist" viewBox="0 0 16 16">
<path d="M14.5 3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h13zm-13-1A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 2h-13z"/>
<path d="M7 5.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm-1.496-.854a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0zM7 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm-1.496-.854a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 0 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0z"/>
</svg>
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
<div class="flex-1 flex justify-between sm:hidden">
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
Previous
</a>
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
Next
</a>
</div>
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div>
<p class="text-sm text-gray-700">
Showing
{{ ' ' }}
<span class="font-medium">{{ this.currentPage }}</span>
{{ ' ' }}
to
{{ ' ' }}
<template v-if="this.totalPage <= this.perPage">
<span class="font-medium">{{ this.totalPage }}</span>
</template>
<template v-else>
<span class="font-medium">{{ this.lastPage }}</span>
</template>
{{ ' ' }}
of
{{ ' ' }}
<span class="font-medium">{{ this.totalPage }}</span>
{{ ' ' }}
results
</p>
</div>
<div>
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
<a href="#" @click="setActive(0)" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">First Page</span>
<ChevronDoubleLeftIcon class="h-5 w-5" aria-hidden="true" />
</a>
<a href="#" @click="setPrevious()" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Previous</span>
<ChevronLeftIcon class="h-5 w-5" aria-hidden="true" />
</a>
<template v-for="(row,i) in rows">
<a v-if="((i+1) < activePage && (i+1) > activePage - 2) || (i+1) == 1 && activePage !=1" @click="setActive(i)" :key="'Z'+i" href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i + 1 }}
</a>
<span v-if="activePage > 3 && (i+1) == 1" :key="'B'+i" class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">
...
</span>
<a v-if="(i+1) == activePage" :key="i" href="#" aria-current="page" class="z-10 bg-indigo-50 border-indigo-500 text-indigo-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ activePage }}
</a>
<a v-if="((i+1) > activePage && (i+1) < activePage + 3) && activePage != (rows-1)" :key="'A'+i" @click="setActive(i)" href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i + 1 }}
</a>
<span v-if="(i+1) == activePage + 3" :key="'B'+i" class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">
...
</span>
<a v-else-if="(i+1) == (rows) && (activePage != (rows-1) && (i+1) != (rows))" :key="'C' + i" @click="setActive(i)" href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i + 1}}
</a>
</template>
<a href="#" @click="setNext()" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Next</span>
<ChevronRightIcon class="h-5 w-5" aria-hidden="true" />
</a>
<a href="#" @click="setActiveLastPage()" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Next</span>
<ChevronDoubleRightIcon class="h-5 w-5" aria-hidden="true" />
</a>
</nav>
</div>
</div>
</div>
</article>
</div>
</template>
<script>
import { ChevronLeftIcon, ChevronRightIcon,ChevronDoubleRightIcon,ChevronDoubleLeftIcon } from '@vue-hero-icons/solid'
import modal from './util/PetiBesiModal.vue'
const formatter = new Intl.NumberFormat('en-US', {
minimumFractionDigits: 2
});
export default {
components: {
ChevronLeftIcon,
ChevronRightIcon,
ChevronDoubleLeftIcon,
ChevronDoubleRightIcon,
modal
},
props: {
petibesi: {
type: Array
}
},
data() {
return {
index: 0,
leftToRight: true,
aliranpetibesi:[],
PaginationLimit: 2,
perPage: 5,
totalPage: 0,
currentPage: 1,
lastPage: 5,
activePage: 1
};
},
computed:{
active() {
let jumsplit = this.activePage*this.perPage
let mulaPage = jumsplit - (this.perPage)
this.currentPage = mulaPage+1
this.lastPage = jumsplit
let vault = this.petibesi.slice(mulaPage, jumsplit)
return {vault,mulaPage,jumsplit}
},
rows() {
this.totalPage = this.$props.petibesi.length
let totaldibahagi = parseInt(this.totalPage/this.perPage)
return totaldibahagi
}
},
methods: {
setActive(index){
this.activePage = index + 1
},
setActiveLastPage(){
let totaldibahagi = parseInt(this.totalPage/this.perPage)
this.activePage = totaldibahagi
},
setPrevious(){
if(this.activePage > 1)
this.activePage = this.activePage - 1
},
setNext(){
let totaldibahagi = parseInt(this.totalPage/this.perPage)
if(this.activePage < totaldibahagi)
this.activePage = this.activePage + 1
},
setItem(index) {
// Update LTR before changing $data.index
this.$data.leftToRight = index > this.$data.index;
this.$data.index = index;
this.activePage = 1;
},
action(tarikh,kodcaw){
axios.get('/api/check/periksapetibesi', {
params: {
tarikh: tarikh,
kodcaw: kodcaw
}
}).then(response => {
if(response.data === 'sama')
{
this.$toast("Nilai Tunai sama dengan nilat tunai")
}else{
this.aliranpetibesi = response.data;
this.$refs.modal.showModal = true;
this.$refs.modal.tarikh = tarikh;
this.$refs.modal.kodcaw = kodcaw;
this.$refs.modal.panjar = formatter.format(this.aliranpetibesi.panjar);
this.$refs.modal.bakiawal = formatter.format(this.aliranpetibesi.bakiawal);
this.$refs.modal.bakiakhir = formatter.format(this.aliranpetibesi.bakiakhir);
this.$refs.modal.pendteller = formatter.format(this.aliranpetibesi.pendahuluanteller);
this.$refs.modal.serteller = formatter.format(this.aliranpetibesi.serahanteller);
this.$refs.modal.serahan = formatter.format(this.aliranpetibesi.serahanpkb);
this.$refs.modal.pendahuluan = formatter.format(this.aliranpetibesi.pendahuluanpkb);
}
});
},
formatterfunction(value){
return formatter.format(value)
}
}
}
</script>
+47 -123
View File
@@ -43,11 +43,11 @@
</tr>
</thead>
<tbody>
<tr v-for="(petibesi,i) in active.vault" :key="i">
<tr v-for="(petibesi,i) in showpetibesi.data" :key="i">
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="(i+1+active.mulaPage)">
<p class="text-gray-900 whitespace-no-wrap" v-text="(showpetibesi.from + i)">
</p>
</div>
</div>
@@ -131,82 +131,8 @@
</tbody>
</table>
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
<div class="flex-1 flex justify-between sm:hidden">
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
Previous
</a>
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
Next
</a>
</div>
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div>
<p class="text-sm text-gray-700">
Showing
{{ ' ' }}
<span class="font-medium">{{ this.currentPage }}</span>
{{ ' ' }}
to
{{ ' ' }}
<template v-if="this.totalPage <= this.perPage">
<span class="font-medium">{{ this.totalPage }}</span>
</template>
<template v-else>
<span class="font-medium">{{ this.lastPage }}</span>
</template>
{{ ' ' }}
of
{{ ' ' }}
<span class="font-medium">{{ this.totalPage }}</span>
{{ ' ' }}
results
</p>
</div>
<div>
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
<a href="#" @click="setActive(0)" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">First Page</span>
<ChevronDoubleLeftIcon class="h-5 w-5" aria-hidden="true" />
</a>
<a href="#" @click="setPrevious()" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Previous</span>
<ChevronLeftIcon class="h-5 w-5" aria-hidden="true" />
</a>
<template v-for="(row,i) in rows">
<a v-if="((i+1) < activePage && (i+1) > activePage - 2) || (i+1) == 1 && activePage !=1" @click="setActive(i)" :key="'Z'+i" href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i + 1 }}
</a>
<span v-if="activePage > 3 && (i+1) == 1" :key="'B'+i" class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">
...
</span>
<a v-if="(i+1) == activePage" :key="i" href="#" aria-current="page" class="z-10 bg-indigo-50 border-indigo-500 text-indigo-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ activePage }}
</a>
<a v-if="((i+1) > activePage && (i+1) < activePage + 3) && activePage != (rows-1)" :key="'A'+i" @click="setActive(i)" href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i + 1 }}
</a>
<span v-if="(i+1) == activePage + 3" :key="'B'+i" class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">
...
</span>
<a v-else-if="(i+1) == (rows) && (activePage != (rows-1) && (i+1) != (rows))" :key="'C' + i" @click="setActive(i)" href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i + 1}}
</a>
</template>
<a href="#" @click="setNext()" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Next</span>
<ChevronRightIcon class="h-5 w-5" aria-hidden="true" />
</a>
<a href="#" @click="setActiveLastPage()" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Next</span>
<ChevronDoubleRightIcon class="h-5 w-5" aria-hidden="true" />
</a>
</nav>
</div>
</div>
</div>
<pagination :data="paginate" @clickEvent_="getPetibesi"></pagination>
</article>
</div>
</template>
@@ -214,6 +140,8 @@
<script>
import { ChevronLeftIcon, ChevronRightIcon,ChevronDoubleRightIcon,ChevronDoubleLeftIcon } from '@vue-hero-icons/solid'
import modal from './util/PetiBesiModal.vue'
import pagination from './pagination.vue'
const formatter = new Intl.NumberFormat('en-US', {
minimumFractionDigits: 2
@@ -225,7 +153,8 @@ export default {
ChevronRightIcon,
ChevronDoubleLeftIcon,
ChevronDoubleRightIcon,
modal
modal,
pagination
},
props: {
@@ -244,57 +173,52 @@ export default {
totalPage: 0,
currentPage: 1,
lastPage: 5,
kodcaw:'KB2',
showpetibesi:[],
paginate:{},
activePage: 1
};
},
computed:{
active() {
let jumsplit = this.activePage*this.perPage
let mulaPage = jumsplit - (this.perPage)
this.currentPage = mulaPage+1
this.lastPage = jumsplit
let vault = this.petibesi.slice(mulaPage, jumsplit)
return {vault,mulaPage,jumsplit}
},
rows() {
this.totalPage = this.$props.petibesi.length
let totaldibahagi = parseInt(this.totalPage/this.perPage)
return totaldibahagi
}
},
created() {
this.getPetibesi(this.currentPage)
},
methods: {
setActive(index){
this.activePage = index + 1
},
setActiveLastPage(){
let totaldibahagi = parseInt(this.totalPage/this.perPage)
this.activePage = totaldibahagi
},
setPrevious(){
if(this.activePage > 1)
this.activePage = this.activePage - 1
},
setNext(){
// setActive(index){
// this.activePage = index + 1
// },
// setActiveLastPage(){
// let totaldibahagi = parseInt(this.totalPage/this.perPage)
// this.activePage = totaldibahagi
// },
// setPrevious(){
// if(this.activePage > 1)
// this.activePage = this.activePage - 1
// },
// setNext(){
let totaldibahagi = parseInt(this.totalPage/this.perPage)
// let totaldibahagi = parseInt(this.totalPage/this.perPage)
if(this.activePage < totaldibahagi)
this.activePage = this.activePage + 1
// if(this.activePage < totaldibahagi)
// this.activePage = this.activePage + 1
// },
// setItem(index) {
// // Update LTR before changing $data.index
// this.$data.leftToRight = index > this.$data.index;
// this.$data.index = index;
// this.activePage = 1;
// },
getPetibesi(pageNumber){
this.axios.get('http://localhost:8000/admin/getPetiBesiPaginate/' + this.kodcaw,{
params: {
page: pageNumber
}
}).then(response => {
this.showpetibesi = response.data
this.paginate = response.data
this.currentPage = pageNumber
});
},
setItem(index) {
// Update LTR before changing $data.index
this.$data.leftToRight = index > this.$data.index;
this.$data.index = index;
this.activePage = 1;
},
action(tarikh,kodcaw){
axios.get('/api/check/periksapetibesi', {
params: {
+47 -42
View File
@@ -45,31 +45,28 @@
</div>
<div v-show="this.specCust">
<div v-show="Object.keys(this.specCust).length > 0">
<form class="w-full mx-auto border border-gray-200 px-4 py-4 rounded mt-4">
<div class="w-full px-3 mb-6 md:mb-0">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-first-name">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
Nama
</label>
<input name="nama" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-red-500 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white" :value="this.specCust.nama">
<p class="text-red-500 text-xs italic">Please fill out this field.</p>
<input readonly name="nama" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" :value="this.specCust.nama">
</div>
<div class="w-full px-3 mt-3">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-last-name">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
Nokp
</label>
<input name="nokp" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" type="text" :value="(this.specCust.kpbaru) ? this.specCust.kpbaru : this.specCust.kplama">
<p class="text-red-500 text-xs italic">Please fill out this field.</p>
<input readonly name="nokp" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" type="text" :value="(this.specCust.kpbaru) ? this.specCust.kpbaru : this.specCust.kplama">
</div>
<div class="w-full px-3 mt-3">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-password">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
Nota
</label>
<textarea v-model="nota" class="appearance-none block h-36 w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white focus:border-gray-500"></textarea>
<p class="text-red-500 text-xs italic">Please fill out this field.</p>
</div>
</form>
</div>
@@ -82,7 +79,7 @@
<button class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 border border-gray-700 rounded mr-1" v-on:click="toggleModal()" type="button">
Batal
</button>
<button class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 border border-green-700 rounded" type="button">
<button class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 border border-green-700 rounded" @click="kemaskinifunc" type="button" >
Daftar
</button>
</div>
@@ -117,7 +114,8 @@ export default {
dropdownShow: false,
param1: "",
arrayCustomer: [],
specCust: []
specCust: [],
nota:''
}
},
mounted() {
@@ -127,7 +125,7 @@ export default {
document.removeEventListener('click', this.onClick);
},
created(){
console.log(this.kodcaw)
// console.log('kodcaw',this.kodcaw)
},
methods: {
toggleModal: function(){
@@ -147,7 +145,7 @@ export default {
}]
});
}else{
console.log('siap')
this.$toast.info("Pelangan tidak dijumpai!")
}
},
@@ -161,7 +159,8 @@ export default {
{
this.axios.get('http://localhost:8000/admin/searchByIC', {
params: {
ic: inputvalue
ic: inputvalue,
kodcaw: this.kodcaw
}
}).then(response => {
this.arrayCustomer = response.data
@@ -175,7 +174,9 @@ export default {
}else{
this.axios.get('http://localhost:8000/admin/searchByName', {
params: {
nama: inputvalue
nama: inputvalue,
kodcaw: this.kodcaw
}
}).then(response => {
this.arrayCustomer = response.data
@@ -191,6 +192,9 @@ export default {
return /\d/.test(inputString);
},
onClick: function(){
if(this.showModal == true)
{
let isClickInside = this.$refs.popoverDropdownRef.contains(event.target);
let searchInside = this.$refs.btnDropdownRef.contains(event.target);
let buttonSearch = document.getElementById('buttonsearch');
@@ -202,7 +206,6 @@ export default {
}
}
else{
if(this.$refs.btnDropdownRef.value != '')
{
this.dropdownShow = false
@@ -212,47 +215,49 @@ export default {
}
}
}
},
ClickUrl: function(customer){
console.log(customer.cust)
let self = this
this.dropdownShow = false
this.arrayCustomer.map(function(value, key) {
if(customer.cust == value.id)
{
self.specCust = value;
}
});
}
// kemaskinifunc: function(){
// // console.log(this.kodcaw + this.kodlaluan + this.tarikh)
// axios.put('/api/check/kemaskinialirantunai',
// {
// kodcaw: this.kodcaw,
// teller: this.kodlaluan,
// tarikh: this.tarikh,
// gadaian: this.gadaian.replace(/[^0-9.-]+/g,""),
// penebusan: this.penebusan.replace(/[^0-9.-]+/g,""),
// bakiakhir: this.bakiakhir.replace(/[^0-9.-]+/g,"")
// }).then(response => {
},
kemaskinifunc: function(){
// if(response.data == 'berjaya')
// {
// this.showModal = false;
// this.$toast.success("Kemaskini Sudah Berjaya!")
// // vm.$forceUpdate();
axios.post('http://localhost:8000/admin/AddSenaraiHitam',
{
kodcaw: this.kodcaw,
nokp: (this.specCust.kpbaru) ? this.specCust.kpbaru : this.specCust.kplama,
nota: this.nota
}).then(response => {
if(response.data == 'berjaya')
{
this.showModal = false;
this.$toast.success("Kemaskini Sudah Berjaya!")
// vm.$forceUpdate();
// this.$emit('clickEvent_', this.pageNumber)
this.$emit('clickEvent_', this.pageNumber)
// // setTimeout("window.location.reload()", 3000);
// }else{
// setTimeout("window.location.reload()", 3000);
}else{
// this.showModal = false;
// this.$toast.error("Kemaskini tidak berjaya")
// }
// });
this.showModal = false;
this.$toast.error("Kemaskini tidak berjaya")
}
});
// }
}
},
}
</script>
+2 -23
View File
@@ -1,7 +1,7 @@
<template>
<div class="">
<modal ref="modal"></modal>
<modal ref="modal" @clickEvent_="getBlacklist"></modal>
<div class="flex justify-between mb-2">
<div>
@@ -25,12 +25,6 @@
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
IC
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Teller
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Pelulus
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Nota
</th>
@@ -65,22 +59,6 @@
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="blacklist.teller">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="blacklist.pelulus">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
@@ -164,6 +142,7 @@ export default {
// $(element).modal('show')
this.$refs.modal.showModal = true;
this.$refs.modal.kodcaw = this.kodcaw;
}
}