Finished up 1688 workflow, approve PO and fill PO

This commit is contained in:
Aqqil Azman
2024-07-16 13:19:18 +08:00
parent 6a8006c0b0
commit 33e6bec752
@@ -12,6 +12,28 @@
</div>
<button @click="selectOrder(order, 'edit')" class="btn btn-primary">Edit PO</button>
</div>
<div v-else-if="currentQuestionId === '1688'">
<div>Login Information</div>
<login-form-component></login-form-component>
<button @click="selectOrder(order, 'issue_login')" class="btn btn-primary">Login Issue</button>
<button @click="selectOrder(order, 'dummy_login')" class="btn btn-primary">Login Succesful</button>
</div>
<div v-else-if="currentQuestionId === 'login_successful'">
<div>Order Information</div>
<button @click="selectOrder(order, 'error_order')" class="btn btn-primary">Can't very order?</button>
<button @click="selectOrder(order, 'verify_order')" class="btn btn-primary">Order Verified</button>
</div>
<div v-else-if="currentQuestionId === 'order_verify'">
<div>Order Amount</div>
<div class="box">
<div v-for="(order, index) in orderNumbers" :key="index" class="order">
<input v-model="orderNumbers[index]" class="form-control" />
</div>
CNY
</div>
<button @click="selectOrder(order, 'yes_order')" class="btn btn-primary">Yes</button>
<button @click="selectOrder(order, 'back_order')" class="btn btn-primary">Back</button>
</div>
<div v-else-if="currentQuestionId === 'approve_po'">
<div class="box">
<div v-for="(order, index) in orderNumbers" :key="index" class="order">
@@ -31,17 +53,43 @@
<button @click="addOrder" class="btn btn-primary">Add Order</button>
<div>Total: CNY</div>
</div>
<button @click="issueOrders" class="btn btn-primary">Issue?</button>
<button @click="issueOthers" class="btn btn-primary">Issue?</button>
<button @click="saveOrders" class="btn btn-primary">Done</button>
</div>
<div v-else-if="currentQuestionId === 'issue_po'">
<div v-else-if="currentQuestionId === '1688_submit'">
<div class="box">
<h3>Upload English PO</h3>
<input type="file" id="image-upload" class="image-upload">
</div>
<div class="box">
<h3>Upload China PO</h3>
<input type="file" id="image-upload" class="image-upload">
</div>
<div class="box">
<h3>Upload bank slip</h3>
<input type="file" id="image-upload" class="image-upload">
</div>
<button @click="nextorder" class="btn btn-primary">Proceed to next order</button>
<button @click="submit_issue" class="btn btn-primary">Submit</button>
</div>
<div v-else-if="currentQuestionId === 'po_others'">
<div class="box">
<h3>What issue did you encounter?</h3>
<input type="text" id="issue" class="text-box" placeholder="Describe the issue...">
<div class="upload-text">Upload an image if needed</div>
<input type="file" id="image-upload" class="image-upload">
</div>
<button @click="selectOrder(order, 'edit')" class="btn btn-primary">Back</button>
<button @click="issueOthers" class="btn btn-primary">Back</button>
<button @click="submit" class="btn btn-primary">Submit issue</button>
</div>
<div v-else-if="currentQuestionId === '1688_others'">
<div class="box">
<h3>What issue did you encounter?</h3>
<input type="text" id="issue" class="text-box" placeholder="Describe the issue...">
<div class="upload-text">Upload an image if needed</div>
<input type="file" id="image-upload" class="image-upload">
</div>
<button @click="issue1688" class="btn btn-primary">Back</button>
<button @click="submit" class="btn btn-primary">Submit issue</button>
</div>
<div v-else>
@@ -85,12 +133,66 @@ export default {
{ text: 'Fill PO', next: 'fill_po' }
]
},
'1688': {
text: 'Q1-A1',
'1688': {},
'issue_login': {
text: 'Login Issues',
answers: [
{ text: 'A1-A1', next: 'q1-a1-a1' },
{ text: 'A1-A2', next: 'q1-a1-a2' }
]
{ text: 'Need TAC', next: 'issue_submit'},
{ text: 'Wrong login details', next: 'issue_submit'},
{ text: 'Others', next: 'po_others'},
{ text: 'Order Cancelled', next: 'refund_request'},
]
},
'login_successful': {},
'issue_order': {
answers: [
{ text: 'Amount not found', next: 'issue_submit'},
{ text: 'Plus Member', next: 'issue_submit'},
{ text: 'Others', next: 'po_others'},
{ text: 'Customer Did not verify 1688 account', next: 'issue_submit'},
{ text: 'WorldFirst account linked another account', next: 'issue_submit'},
{ text: 'Back', next: 'login_successful'},
]
},
'order_verify': {},
'order_verification': {
text: 'Are You Sure this is the correct amount?',
answers: [
{text: 'Yes', next: 'proceed_order'},
{text: 'No', next: 'insufficient_order'}
]
},
'proceed_order': {
text: 'Please proceed the order on 1688',
answers: [
{text: 'Got Issue', next: '1688_order_issue'},
{text: 'Done', next: '1688_submit'}
]
},
'1688_order_issue': {
answers: [
{text: 'Wrong Pin Number', next: '1688_issue_submit'},
{text: 'Not Enough Stock', next: '1688_issue_submit'},
{text: 'Others', next: '1688_others'},
{text: 'No CrossBoarder', next: '1688_issue_submit'},
{text: 'AngPau', next: '1688_issue_submit'}
]
},
'1688_others': {},
'1688_submit': {},
'1688_issue_submit': {
text: 'Issue has been submitted',
answers: [
{ text: 'Stop Working', next: 'stop_working'},
{ text: 'Next Order', next: '1688'}
]
},
'refund_request': {
text: 'Refund Request sent',
answers: [
{ text: 'Stop Working', next: 'stop_working' },
{ text: 'Next PO', next: 'approve_po' }
]
},
'approve_po': {},
'fill_po': {},
@@ -110,10 +212,38 @@ export default {
]
},
'edit_po': {},
'issue_po': {},
'po_others': {},
'reject_po': {
text: 'PO Rejected',
answers: [
{ text: 'Issue', next: 'issue_po' },
{ text: 'Back', next: 'approve_po' }
]
},
'issue_po': {
answers: [
{ text: 'Sensitive Goods', next: 'issue_submit'},
{ text: 'Others', next: 'po_others'},
{ text: 'Stop Working', next: 'stop_working'},
{ text: 'Next PO', next: 'approve_po'}
]
},
'issue_submit': {
text: 'Issue has been submitted',
answers: [
{ text: 'Stop Working', next: 'stop_working'},
{ text: 'Next Order', next: 'approve_po'}
]
},
'1688_issue_submitted': {
text: 'Issue has been submitted',
answers: [
{ text: 'Stop Working', next: 'stop_working'},
{ text: 'Next Order', next: '1688'}
]
},
'stop_working': {
text: 'Thank you for your work!',
answers: []
}
},
currentQuestionId: null,
@@ -139,7 +269,19 @@ export default {
} else if (action === 'edit') {
this.currentQuestionId = 'edit_po';
} else if (action === 'reject') {
alert(`${order} has been rejected.`);
this.currentQuestionId = 'reject_po';
} else if (action == 'issue_login') {
this.currentQuestionId = 'issue_login'
} else if (action == 'dummy_login') {
this.currentQuestionId = 'login_successful'
} else if (action == 'error_order') {
this.currentQuestionId = 'issue_order'
} else if (action == 'verify_order') {
this.currentQuestionId = 'order_verify'
} else if (action == 'back_order') {
this.currentQuestionId = 'login_successful'
} else if (action == 'yes_order') {
this.currentQuestionId = 'order_verification'
}
},
addOrder() {
@@ -149,9 +291,18 @@ export default {
alert('Orders have been saved: ' + this.orderNumbers.join(', '));
this.currentQuestionId = 'po_filled';
},
issueOrders(){
nextorder() {
this.currentQuestionId = '1688';
},
issueOthers(){
this.currentQuestionId = 'issue_po';
},
issue1688() {
this.currentQuestionId = '1688_order_issue';
},
submit_issue() {
this.currentQuestionId = '1688_issue_submitted';
},
submit() {
}