|
@@ -42,13 +42,29 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
|
|
|
- <el-button type="success"
|
|
|
- size="small"
|
|
|
- :loading="buttonLoading"
|
|
|
- class="el-button--small-yh "
|
|
|
- :disabled="true"
|
|
|
- @click.stop="">复制单据
|
|
|
- </el-button>
|
|
|
+ <el-dropdown style="padding: 0 8px;line-height: 0">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ :loading="buttonLoading"
|
|
|
+ :disabled="!form.id || viewDisabled"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ 业务处理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item
|
|
|
+ :loading="buttonLoading"
|
|
|
+ :disabled="!form.id || viewDisabled"
|
|
|
+ @click.native="createData()">创建单据
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ :loading="buttonLoading"
|
|
|
+ :disabled="!form.id || viewDisabled"
|
|
|
+ @click.native="copyData()">复制单据
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
<el-button
|
|
|
class="el-button--small-yh "
|
|
|
type="primary"
|
|
@@ -280,7 +296,7 @@
|
|
|
size="small"
|
|
|
|
|
|
:disabled="selectContact.length == 0 || viewDisabled"
|
|
|
- @click="beforePage(false)"
|
|
|
+ @click="beforePage()"
|
|
|
>生成收货单
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -985,7 +1001,7 @@ export default {
|
|
|
selectionContact(row){
|
|
|
this.selectContact = row;
|
|
|
},
|
|
|
- beforePage(type){
|
|
|
+ beforePage(){
|
|
|
let id = this.selectContact.map(item=>{
|
|
|
return item.id ? true : false
|
|
|
})
|
|
@@ -994,50 +1010,23 @@ export default {
|
|
|
id:this.form.id,
|
|
|
orderItemIds:this.selectContact.map(i=>{return i.$index})
|
|
|
}
|
|
|
- if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
|
|
|
- || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
|
|
|
- ){
|
|
|
- this.$confirm("数据发生变化,请先提交保存!", {
|
|
|
- confirmButtonText: "保存",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.editCustomer();
|
|
|
- })
|
|
|
- }else{
|
|
|
- if(type){
|
|
|
- //进入付款管理
|
|
|
- // if(this.$store.getters.payStatus){
|
|
|
- // this.$alert("付款页面已存在,请关闭付款页面再进行操作", "温馨提示", {
|
|
|
- // confirmButtonText: "确定",
|
|
|
- // type: 'warning',
|
|
|
- // callback: action => {
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }else{
|
|
|
- // this.$router.$avueRouter.closeTag('/financialManagement/payment');
|
|
|
- // this.$router.push({
|
|
|
- // path: "/financialManagement/payment",
|
|
|
- // query: {params: params},
|
|
|
- // });
|
|
|
- // }
|
|
|
+ const valid = this.verificationData()
|
|
|
+ if(valid){
|
|
|
+ //进入收货单
|
|
|
+ if(this.$store.getters.takeStatus){
|
|
|
+ this.$alert("收货单页面已存在,请关闭收货单再进行操作", "温馨提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ type: 'warning',
|
|
|
+ callback: action => {
|
|
|
+ }
|
|
|
+ });
|
|
|
}else{
|
|
|
- //进入收货单
|
|
|
- if(this.$store.getters.takeStatus){
|
|
|
- this.$alert("收货单页面已存在,请关闭收货单再进行操作", "温馨提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- type: 'warning',
|
|
|
- callback: action => {
|
|
|
- }
|
|
|
- });
|
|
|
- }else{
|
|
|
- //关闭一下存在的列表页
|
|
|
- this.$router.$avueRouter.closeTag('/importTrade/receipt/index');
|
|
|
- this.$router.push({
|
|
|
- path: "/importTrade/receipt/index",
|
|
|
- query: {params: params},
|
|
|
- });
|
|
|
- }
|
|
|
+ //关闭一下存在的列表页
|
|
|
+ this.$router.$avueRouter.closeTag('/importTrade/receipt/index');
|
|
|
+ this.$router.push({
|
|
|
+ path: "/importTrade/receipt/index",
|
|
|
+ query: {params: params},
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
@@ -1072,17 +1061,8 @@ export default {
|
|
|
},
|
|
|
// 付款
|
|
|
applyPayment(type){
|
|
|
- if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
|
|
|
- || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
|
|
|
- ){
|
|
|
- this.$confirm("数据发生变化,请先提交保存!", {
|
|
|
- confirmButtonText: "保存",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.editCustomer();
|
|
|
- })
|
|
|
- }else{
|
|
|
+ const valid = this.verificationData()
|
|
|
+ if(valid){
|
|
|
this.beforeBillData(true,type);
|
|
|
this.applyPaymentDialog = true;
|
|
|
}
|
|
@@ -1149,6 +1129,76 @@ export default {
|
|
|
//点击行可编辑
|
|
|
handleRowClick(row, event, column) {
|
|
|
},
|
|
|
+ verificationData(){
|
|
|
+ if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
|
|
|
+ || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
|
|
|
+ ) {
|
|
|
+ this.$confirm("数据发生变化,请先提交保存!", "提示", {
|
|
|
+ confirmButtonText: "保存",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ this.editCustomer()
|
|
|
+ }).catch(()=>{
|
|
|
+ return false
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ createData(){
|
|
|
+ const valid = this.verificationData()
|
|
|
+ if(valid){
|
|
|
+ this.$confirm("确定创建新的单据吗?", "提示", {
|
|
|
+ confirmButtonText: "保存",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ this.form = {}
|
|
|
+ this.oldForm = {}
|
|
|
+ this.contactsData = []
|
|
|
+ this.oldContactsData = []
|
|
|
+ this.orderFeesList = []
|
|
|
+ this.oldFeesList = []
|
|
|
+ this.orderFilesList = []
|
|
|
+ this.oldFilesList = []
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ copyData(){
|
|
|
+ const valid = this.verificationData()
|
|
|
+ if(valid){
|
|
|
+ this.takeDisabled = false
|
|
|
+ this.basicData.column.forEach(item =>{
|
|
|
+ if(item.prop == "businesDate" || item.prop == "requiredDeliveryDate" || item.prop == "requiredArrivalDate" || item.prop == "latestDate" || item.prop == ""){
|
|
|
+ item.disabled = this.takeDisabled
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ delete this.form.id //删除id
|
|
|
+ this.$set(this.form,"sysNo","")//系统编号
|
|
|
+ this.$set(this.form,"orderNo","")//合同号
|
|
|
+ this.$set(this.form,"settlmentAmount","")//已付人民币
|
|
|
+ this.$set(this.form,"foreignSettlmentAmount","")//已付外币
|
|
|
+ this.$set(this.form,"refundSettlmentAmount","")//已退人民币
|
|
|
+ this.$set(this.form,"refundForeignSettlmentAmount","")//已退外币
|
|
|
+
|
|
|
+ this.contactsData.forEach(item =>{
|
|
|
+ delete item.id //删除id
|
|
|
+ item.actualQuantity = "" //已收件数
|
|
|
+ item.actualWeight = "" //已收发票
|
|
|
+ })
|
|
|
+
|
|
|
+ this.orderFeesList.forEach(item =>{
|
|
|
+ delete item.id //删除id
|
|
|
+ })
|
|
|
+
|
|
|
+ this.oldForm = {}
|
|
|
+ this.oldContactsData = []
|
|
|
+ this.oldFeesList = []
|
|
|
+ this.oldFilesList = []
|
|
|
+ }
|
|
|
+ },
|
|
|
backToList() {
|
|
|
if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
|
|
|
|| contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
|