|
@@ -9,7 +9,12 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="计划单号" prop="plannum">
|
|
|
- <a-input-search placeholder="请输入计划单号" enter-button v-model="key" @search="onSearch" />
|
|
|
+ <a-input-search
|
|
|
+ placeholder="请输入计划单号"
|
|
|
+ enter-button
|
|
|
+ v-model="detailsPlanNum.planNum"
|
|
|
+ @search="onSearch"
|
|
|
+ />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<!-- 回显以下【备注】需要输入,后进行保存 disabled -->
|
|
@@ -61,7 +66,7 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="人民币费用支出" prop="rmbExpense">
|
|
|
- {{ detailsPlanNum.rmbExpense }}
|
|
|
+ <a href="javascript:void(0)" @click="mainTableExpenseCNY()">{{ detailsPlanNum.rmbExpense }}</a>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
@@ -81,7 +86,7 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="美元费用支出" prop="usdExpense">
|
|
|
- {{ detailsPlanNum.usdExpense }}
|
|
|
+ <a href="javascript:void(0)" @click="mainTableExpenseUSD()">{{ detailsPlanNum.usdExpense }}</a>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
@@ -202,7 +207,7 @@
|
|
|
|
|
|
<!-- 备注信息 根据角色权限控制【填写】、【查看】-->
|
|
|
<div class="note-one" style="marginTop:40px;">
|
|
|
- <h6 class="table-title">备注信息</h6>
|
|
|
+ <h6 class="table-title">备注</h6>
|
|
|
<div class="noteDetail">
|
|
|
<a-form-model ref="form" :model="detailsPlanNum">
|
|
|
<a-form-model-item prop="remarks">
|
|
@@ -220,7 +225,7 @@
|
|
|
<!-- 页面底部保存 -->
|
|
|
<a-row :gutter="24" style="marginTop:40px;float:right">
|
|
|
<a-col :md="12" :sm="12">
|
|
|
- <a-button type="primary" @click="save">
|
|
|
+ <a-button type="primary" @click="save" :disabled="isDisabled">
|
|
|
保存
|
|
|
</a-button>
|
|
|
</a-col>
|
|
@@ -243,7 +248,8 @@
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import moment from 'moment'
|
|
|
-// import tabs from '@views/reportForms/cost-allocation-table/tabs.vue' // tabs组件
|
|
|
+
|
|
|
+// 原始文件(应该跟单证内弹框一样,尝试公用,成功后可删除以下注释)
|
|
|
// import mainTableExpenseCNYModal from '@views/reportForms/cost-allocation-table/mainTableExpenseCNYModal.vue'
|
|
|
// import mainTableExpenseUSDModal from '@views/reportForms/cost-allocation-table/mainTableExpenseUSDModal.vue'
|
|
|
// import accidentListModal from '@views/reportForms/fabric-loss-table/accidentListModal.vue' // 事故单
|
|
@@ -255,8 +261,7 @@ import mainTableExpenseCNYModal from '@views/cost-allocation-total/modal/mainTab
|
|
|
import mainTableExpenseUSDModal from '@views/cost-allocation-total/modal/mainTableExpenseUSDModal.vue'
|
|
|
import accidentListModal from '@views/cost-allocation-total/modal/accidentListModal.vue' // 事故单
|
|
|
|
|
|
-import { costByPlanNum } from '@api/document/cost-allocation-total.js'
|
|
|
-//接口同 单证-成本汇总报表
|
|
|
+import { seachPlanNum, addHalfInfo } from '@api/document/cost-allocation-total.js'
|
|
|
|
|
|
export default {
|
|
|
name: 'CostAllocationTable', // 成本分配 (新增)
|
|
@@ -267,7 +272,9 @@ export default {
|
|
|
return {
|
|
|
key: '', //客户输入的订单号
|
|
|
loading: false, // 表格加载
|
|
|
- detailsPlanNum: {}, // 详情所有数据
|
|
|
+ detailsPlanNum: {
|
|
|
+ planNum: ''
|
|
|
+ }, // 详情所有数据
|
|
|
remarks: '', // 备注
|
|
|
|
|
|
// 事故单 表头
|
|
@@ -296,7 +303,9 @@ export default {
|
|
|
{ title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
|
|
|
],
|
|
|
costPayData: [],
|
|
|
- visible: true // 成本分配 新增
|
|
|
+
|
|
|
+ isDisabled: false, //按钮禁止
|
|
|
+ billstatus: '' // 单据状态
|
|
|
// dateFormat: 'YYYY-MM-DD',
|
|
|
}
|
|
|
},
|
|
@@ -305,8 +314,8 @@ export default {
|
|
|
// 【计划单号】 搜索
|
|
|
onSearch() {
|
|
|
this.$nextTick(() => {
|
|
|
- // console.log('客户输入的planNum', plannum, this.detailsPlanNum.planNum)
|
|
|
- costByPlanNum({ plannum: this.key, type: 'query' }).then(res => {
|
|
|
+ // TODO:接口完善后,type 应改为 add(暂时为了回显数据)
|
|
|
+ seachPlanNum({ plannum: this.detailsPlanNum.planNum, type: 'query' }).then(res => {
|
|
|
if (res.success) {
|
|
|
this.detailsPlanNum = res.result //所有详情
|
|
|
this.accidentListData = res.result.syCostAllocationAccidentList //事故单
|
|
@@ -334,6 +343,37 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 页面 保存
|
|
|
+ save() {
|
|
|
+ console.log('点击保存')
|
|
|
+
|
|
|
+ this.isDisabled = true
|
|
|
+ setTimeout(() => {
|
|
|
+ let that = this
|
|
|
+ that.isDisabled = false
|
|
|
+ }, 3000)
|
|
|
+
|
|
|
+ if (this.detailsPlanNum.remarks) {
|
|
|
+ // 保存 部分信息
|
|
|
+ var halfInfo = {}
|
|
|
+ halfInfo.planNum = this.detailsPlanNum.planNum
|
|
|
+ halfInfo.remarks = this.detailsPlanNum.remarks
|
|
|
+ halfInfo.billstatus = '1'
|
|
|
+ console.log(halfInfo.planNum, halfInfo.remarks, halfInfo.billstatus)
|
|
|
+
|
|
|
+ addHalfInfo(halfInfo).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ console.log('保存的部分信息', halfInfo)
|
|
|
+ this.$message.success('保存成功')
|
|
|
+
|
|
|
+ halfInfo = {}
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error('订单号不能为空')
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
// 主表:人民币费用支出 弹框
|
|
|
mainTableExpenseCNY() {
|
|
|
console.log('点击:主表人民币费用支出')
|
|
@@ -358,23 +398,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- onClose() {
|
|
|
- this.visible = false
|
|
|
- },
|
|
|
- // 页面 保存
|
|
|
- save() {
|
|
|
- console.log('保存该计划单号的备注、数据保存到单证【成本分配汇总】,覆盖该计划单号之前的信息')
|
|
|
- // const that = this
|
|
|
-
|
|
|
- if (aaa) {
|
|
|
- // alert('保存!')
|
|
|
- console.log('备注信息:', this.costAllocationTable.noteOne, '计划单号:', this.costAllocationTable.planNum)
|
|
|
- // that.$message.success(res.message)
|
|
|
- that.$message.success('保存成功,数据添加到成本分配汇总')
|
|
|
- } else {
|
|
|
- this.$message.info('请选择计划单号、输入备注信息')
|
|
|
- }
|
|
|
- },
|
|
|
// father 方法
|
|
|
aa() {},
|
|
|
bb() {},
|