|
|
@@ -25,6 +25,8 @@
|
|
|
{{ $t('common.action') }}<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item command="remark" v-if="scope.row.COUNTRY.value === 'UAE'" @click.native="handleEditRemark(scope.row)" >{{ $t('table.remark') }}</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="edit" v-if="scope.row.COUNTRY.value === 'UAE'" @click.native="handleInvoiceExport(scope.row)">{{ $t('shop.invoice') }}</el-dropdown-item>
|
|
|
<el-dropdown-item command="edit" @click.native="handleDel(scope.row)" v-if="permission.hasPermission(`shop/edit`)">{{ $t('shop.deleteOrder') }}</el-dropdown-item>
|
|
|
<!-- <el-dropdown-item command="edit" @click.native="handleEdit(scope.row)" v-if="permission.hasPermission(`shop/edit`)">Edit order<!– 编辑订单 –></el-dropdown-item>
|
|
|
<el-dropdown-item command="delivery" @click.native="handleShowDeliveryDialog(scope.row)" v-if="permission.hasPermission(`shop/order-delivery`) && scope.row['STATUS'] === '1' && scope.row['DELIVERY_STATUS'] === '0' ">deliver goods<!– 发货 –></el-dropdown-item>
|
|
|
@@ -55,6 +57,21 @@
|
|
|
<el-button type="primary" @click.native="handleDelivery">{{ $t('shop.deliverGoods') }}<!-- 发货 --></el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog :title="$t('table.remark')" :visible.sync="dialogRemark"><!-- 备注 -->
|
|
|
+ <Tinymce
|
|
|
+ v-if="dialogRemark"
|
|
|
+ v-model="orderRemark"
|
|
|
+ :toolbar="['undo redo | bold italic underline | bullist numlist | removeformat']"
|
|
|
+ :menubar="false"
|
|
|
+ :editorImageShow="false"
|
|
|
+ :height="300"
|
|
|
+ />
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogRemark = false">{{ $t('table.cancel') }}<!-- 取 消 --></el-button>
|
|
|
+ <el-button type="primary" @click.native="saveRemark">{{ $t('common.confirm') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -65,11 +82,19 @@
|
|
|
import permission from '@/utils/permission'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import filterHelper from '@/utils/filterHelper'
|
|
|
- import { orderList, orderListExport, orderListExportPdf, deleteOrder } from '@/api/shop'
|
|
|
+ import {
|
|
|
+ orderList,
|
|
|
+ orderListExport,
|
|
|
+ orderListExportPdf,
|
|
|
+ deleteOrder,
|
|
|
+ updateOrderRemark,
|
|
|
+ orderInvoiceExport
|
|
|
+ } from '@/api/shop'
|
|
|
+ import Tinymce from '@/components/Tinymce'
|
|
|
|
|
|
export default {
|
|
|
name: 'shop_order-list',
|
|
|
- components: {FilterUser, Pagination},
|
|
|
+ components: {FilterUser, Pagination, Tinymce},
|
|
|
mounted () {
|
|
|
// let system = getOperatingSystem()
|
|
|
// if (system == "Android" || system == 'ios') {
|
|
|
@@ -102,6 +127,9 @@
|
|
|
expressCompany: '',
|
|
|
orderTrackNo: '',
|
|
|
},
|
|
|
+ dialogRemark: false,
|
|
|
+ orderRemark: '',
|
|
|
+ remarkOrderSn: '',
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -232,6 +260,43 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ handleEditRemark(row) {
|
|
|
+ this.orderRemark = ''
|
|
|
+ this.dialogRemark = true
|
|
|
+ this.remarkOrderSn = row.SN.value
|
|
|
+ this.orderRemark = row.INVOICE_REMARK != null || row.INVOICE_REMARK !== '' ? row.INVOICE_REMARK : ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ saveRemark(){
|
|
|
+ updateOrderRemark({orderSn: this.remarkOrderSn, invoiceRemark: this.orderRemark}).then(response => {
|
|
|
+ this.$message({
|
|
|
+ message: response.data,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.dialogRemark = false
|
|
|
+ this.orderRemark = ''
|
|
|
+ this.getData(this.currentPage, this.pageSize)
|
|
|
+ }).catch(err => {
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleInvoiceExport(row) {
|
|
|
+ orderInvoiceExport(row.SN.value).then(response => {
|
|
|
+ this.$message({
|
|
|
+ message: response.data,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ console.log( response)
|
|
|
+ }).catch(err => {
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|