|
@@ -1,65 +1,62 @@
|
|
|
<template>
|
|
|
- <!-- 成本分配 新增(新增后数据到单证的成本分配汇总内)-->
|
|
|
+ <!-- 成本分配 (保存后数据到单证的成本分配汇总内)-->
|
|
|
<div id="costAllocationAdd">
|
|
|
- <!-- <a-drawer
|
|
|
- title="新增"
|
|
|
- width="89%"
|
|
|
- placement="right"
|
|
|
- :closable="true"
|
|
|
- :visible="visible"
|
|
|
- @close="handleCancel"> -->
|
|
|
-
|
|
|
<a-card :bordered="false">
|
|
|
- <!-- 主表信息 填写-->
|
|
|
+ <!-- 主表信息 -->
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form-model layout="inline" ref="form" :model="costAllocationAdd" :rules="validatorRules">
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="计划单号" prop="planNum">
|
|
|
- <a-input placeholder="请输入计划单号" v-model="costAllocationAdd.planNum"></a-input>
|
|
|
+ <!-- <a-input placeholder="请输入计划单号" v-model="costAllocationAdd.planNum"></a-input> -->
|
|
|
+ <a-input-search
|
|
|
+ placeholder="请输入计划单号"
|
|
|
+ enter-button
|
|
|
+ v-model="costAllocationAdd.planNum"
|
|
|
+ @search="onSearch"
|
|
|
+ />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
-
|
|
|
+ <!-- 输入【计划单号】点击搜索后,回显以下所有信息,【备注】需要输入,后进行保存 -->
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="产品款号" prop="poStyleNum">
|
|
|
- <a-input placeholder="请输入外销员" v-model="costAllocationAdd.poStyleNum"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.poStyleNum" disabled></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="外销员" prop="exportSales">
|
|
|
- <a-input placeholder="请输入外销员" v-model="costAllocationAdd.exportSales"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.exportSales" disabled></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="成衣合同号" prop="garmentContractNo">
|
|
|
- <a-input placeholder="请输入成衣合同号" v-model="costAllocationAdd.garmentContractNo"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.garmentContractNo"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="部门" prop="department">
|
|
|
- <a-input placeholder="请输入部门" v-model="costAllocationAdd.department"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.department"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="客户简称" prop="customerShortName">
|
|
|
- <a-input placeholder="请输入客户简称" v-model="costAllocationAdd.customerShortName"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.customerShortName"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="加工单位" prop="processUnit">
|
|
|
- <a-input placeholder="请输入加工单位" v-model="costAllocationAdd.processUnit"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.processUnit"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="出运日期" prop="outData">
|
|
|
<a-date-picker
|
|
|
- placeholder="请输入出运日期"
|
|
|
style="width: 100%"
|
|
|
:format="dateFormat"
|
|
|
v-model="costAllocationAdd.outData"
|
|
@@ -69,13 +66,13 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="计划数量" prop="planQuantity">
|
|
|
- <a-input placeholder="请输入计划数量" v-model="costAllocationAdd.planQuantity"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.planQuantity"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="美元外销总价" prop="USDTotalExportPrice">
|
|
|
- <a-input placeholder="请输入美元外销总价" v-model="costAllocationAdd.USDTotalExportPrice"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.USDTotalExportPrice"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -83,7 +80,6 @@
|
|
|
<a-form-model-item label="人民币费用支出" prop="RMBExpense">
|
|
|
<a-input
|
|
|
v-model="costAllocationAdd.RMBExpense"
|
|
|
- placeholder="请输入人民币费用支出"
|
|
|
style="color:#027db4;"
|
|
|
@click="mainTableExpenseCNY"
|
|
|
></a-input>
|
|
@@ -92,19 +88,19 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="税率%" prop="taxRate">
|
|
|
- <a-input placeholder="请输入税率" v-model="costAllocationAdd.taxRate"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.taxRate"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="实际出货数量" prop="actualShipQuantity">
|
|
|
- <a-input placeholder="请输入实际出货数量" v-model="costAllocationAdd.actualShipQuantity"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.actualShipQuantity"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="人民币外销金额" prop="RMBExportAmount">
|
|
|
- <a-input placeholder="请输入人民币外销金额" v-model="costAllocationAdd.RMBExportAmount"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.RMBExportAmount"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -112,7 +108,6 @@
|
|
|
<a-form-model-item label="美元费用支出" prop="USDExpense">
|
|
|
<a-input
|
|
|
v-model="costAllocationAdd.USDExpense"
|
|
|
- placeholder="请输入美元费用支出"
|
|
|
style="color:#027db4;"
|
|
|
@click="mainTableExpenseUSD"
|
|
|
></a-input>
|
|
@@ -121,91 +116,79 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="加工费" prop="processCost">
|
|
|
- <a-input placeholder="请输入加工费" v-model="costAllocationAdd.processCost"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.processCost"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="短出数" prop="shortSeveral">
|
|
|
- <a-input placeholder="请输入短出数" v-model="costAllocationAdd.shortSeveral"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.shortSeveral"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="短出货值" prop="shortValue">
|
|
|
- <a-input placeholder="请输入短出货值" v-model="costAllocationAdd.shortValue"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.shortValue"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="短出面料成本" prop="fabricShortCost">
|
|
|
- <a-input placeholder="请输入短出面料成本" v-model="costAllocationAdd.fabricShortCost"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.fabricShortCost"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="事故单美金金额" prop="accidentUSDAmount">
|
|
|
- <a-input placeholder="请输入事故单美金金额" v-model="costAllocationAdd.accidentUSDAmount"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.accidentUSDAmount"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="面料含税成本" prop="fabricCostIncludesTax">
|
|
|
- <a-input placeholder="请输入面料含税成本" v-model="costAllocationAdd.fabricCostIncludesTax"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.fabricCostIncludesTax"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="辅料含税成本" prop="excipienCostIncludesTax">
|
|
|
- <a-input placeholder="请输入辅料含税成本" v-model="costAllocationAdd.excipienCostIncludesTax"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.excipienCostIncludesTax"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="销售订单本币总额" prop="salesOrdersLocalTotal">
|
|
|
- <a-input
|
|
|
- placeholder="请输入销售订单本币总额"
|
|
|
- v-model="costAllocationAdd.salesOrdersLocalTotal"
|
|
|
- ></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.salesOrdersLocalTotal"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="事故单人民币金额" prop="accidentCNYAmount">
|
|
|
- <a-input placeholder="请输入事故单人民币金额" v-model="costAllocationAdd.accidentCNYAmount"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.accidentCNYAmount"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="面料不含税成本" prop="fabricCostNotIncludesTax">
|
|
|
- <a-input
|
|
|
- placeholder="请输入面料不含税成本"
|
|
|
- v-model="costAllocationAdd.fabricCostNotIncludesTax"
|
|
|
- ></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.fabricCostNotIncludesTax"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="辅料不含税成本" prop="excipienCostNotIncludesTax">
|
|
|
- <a-input
|
|
|
- placeholder="请输入辅料不含税成本"
|
|
|
- v-model="costAllocationAdd.excipienCostNotIncludesTax"
|
|
|
- ></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.excipienCostNotIncludesTax"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="销售订单原币总额" prop="salesOrdersOriginalTotal">
|
|
|
- <a-input
|
|
|
- placeholder="请输入销售订单原币总额"
|
|
|
- v-model="costAllocationAdd.salesOrdersOriginalTotal"
|
|
|
- ></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.salesOrdersOriginalTotal"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="制单人" prop="preparedBy">
|
|
|
- <a-input placeholder="请输入制单人" v-model="costAllocationAdd.preparedBy"></a-input>
|
|
|
+ <a-input v-model="costAllocationAdd.preparedBy"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -218,10 +201,7 @@
|
|
|
</a-row>
|
|
|
</a-form-model>
|
|
|
</div>
|
|
|
- <!-- </a-card> -->
|
|
|
|
|
|
- <!-- 子表 -->
|
|
|
- <!-- <a-card :bordered="false" style="marginTop:10px;"> -->
|
|
|
<!--tabs 组件引入 -->
|
|
|
<tabs />
|
|
|
|
|
@@ -257,53 +237,41 @@
|
|
|
</a-table>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 备注信息 1 根据角色权限控制【填写】、【查看】-->
|
|
|
+ <!-- 备注信息 1 根据角色判断 显示备注 1 或备注 2-->
|
|
|
<div class="note-one" style="marginTop:40px;">
|
|
|
<h6 class="table-title">备注信息 1</h6>
|
|
|
<div class="noteDetail">
|
|
|
- <a-input type="textarea" v-model="noteOne" placeholder="请输入备注 1" style="minHeight:100px;" />
|
|
|
- <a-button type="primary" @click="savenoteOne">保存</a-button>
|
|
|
+ <a-form-model ref="form" :model="costAllocationAdd" :rues="validatorRules">
|
|
|
+ <a-form-model-item prop="noteOne">
|
|
|
+ <a-input
|
|
|
+ type="textarea"
|
|
|
+ v-model="costAllocationAdd.noteOne"
|
|
|
+ placeholder="请输入备注"
|
|
|
+ style="minHeight:100px;"
|
|
|
+ />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-form-model>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 备注信息 2 根据角色权限控制【填写】、【查看】-->
|
|
|
- <div class="note-two" style="margin:40px 0 40px 0;">
|
|
|
+ <!-- <div class="note-two" style="margin:40px 0 40px 0;">
|
|
|
<h6 class="table-title">备注信息 2</h6>
|
|
|
<div class="noteDetail">
|
|
|
<a-input type="textarea" v-model="noteTwo" placeholder="请输入备注 2" style="minHeight:100px;" />
|
|
|
- <a-button type="primary" @click="savenoteTwo">保存</a-button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
+ <!-- 页面底部保存 -->
|
|
|
+ <a-row :gutter="24" style="marginTop:40px;float:right">
|
|
|
<a-col :md="12" :sm="12">
|
|
|
-
|
|
|
+ <a-button type="primary" @click="save">
|
|
|
+ 保存
|
|
|
+ </a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-card>
|
|
|
|
|
|
- <!-- 页面底部保存取消 -->
|
|
|
- <!-- <div
|
|
|
- :style="{
|
|
|
- position: 'absolute',
|
|
|
- right: 0,
|
|
|
- bottom: 0,
|
|
|
- width: '100%',
|
|
|
- borderTop: '1px solid #e9e9e9',
|
|
|
- padding: '10px 16px',
|
|
|
- background: '#fff',
|
|
|
- textAlign: 'right',
|
|
|
- zIndex: 1
|
|
|
- }"
|
|
|
- >
|
|
|
- <a-popconfirm title="确定放弃新增?" @confirm="handleCancel" okText="确定" cancelText="取消">
|
|
|
- <a-button :style="{ marginRight: '8px' }">取消</a-button>
|
|
|
- </a-popconfirm>
|
|
|
- <a-button type="primary" @click="submitAdd">
|
|
|
- 提交
|
|
|
- </a-button>
|
|
|
- </div> -->
|
|
|
-
|
|
|
<!-- 弹框 -->
|
|
|
<div>
|
|
|
<!-- 主表 人民币费用支出 弹框 -->
|
|
@@ -313,7 +281,6 @@
|
|
|
<!-- 事故单 -->
|
|
|
<accidentList-modal ref="accidentListModal" :father="cc"></accidentList-modal>
|
|
|
</div>
|
|
|
- <!-- </a-drawer> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -334,7 +301,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
loading: false, // 表格加载
|
|
|
- costAllocationAdd: [], // 成本分配统计
|
|
|
+ costAllocationAdd: {}, // 成本分配统计
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
noteOne: '', // 备注 1
|
|
|
noteTwo: '', // 备注 2
|
|
@@ -367,15 +334,17 @@ export default {
|
|
|
visible: true, // 成本分配 新增
|
|
|
|
|
|
validatorRules: {
|
|
|
- planNum: [{ required: true, message: '计划单号不能为空', trigger: 'blur' }],
|
|
|
- poStyleNum: [{ required: true, message: '产品款号不能为空', trigger: 'blur' }],
|
|
|
- exportSales: [{ required: true, message: '外销员不能为空', trigger: 'blur' }]
|
|
|
- // 确定必填项
|
|
|
+ planNum: [{ required: true, message: '请输入计划单号进行搜索', trigger: 'blur' }]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
created() {},
|
|
|
methods: {
|
|
|
+ // 【计划单号】 搜索
|
|
|
+ onSearch(value) {
|
|
|
+ console.log('【计划单号】 ', value)
|
|
|
+ // 根据计划单号查询该页面所有信息且回显
|
|
|
+ },
|
|
|
// 主表:人民币费用支出 弹框
|
|
|
mainTableExpenseCNY() {
|
|
|
console.log('点击:主表人民币费用支出')
|
|
@@ -399,46 +368,23 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- // ---------------------------------------
|
|
|
- // 保存备注 1
|
|
|
- savenoteOne() {
|
|
|
- console.log('保存 备注 1')
|
|
|
- },
|
|
|
- // 保存备注 2
|
|
|
- savenoteTwo() {
|
|
|
- console.log('保存 备注 2')
|
|
|
- },
|
|
|
|
|
|
// --------------------------------------
|
|
|
- // 抽屉 取消
|
|
|
- handleCancel() {
|
|
|
- console.log('点击抽屉取消')
|
|
|
- this.close()
|
|
|
- },
|
|
|
- // 抽屉 提交
|
|
|
- submitAdd() {
|
|
|
- console.log('保存新增、刷新单证【成本分配汇总】数据')
|
|
|
+ // 页面 保存
|
|
|
+ save() {
|
|
|
+ console.log('保存该计划单号的备注、数据保存到单证【成本分配汇总】')
|
|
|
const that = this
|
|
|
- // 触发表单验证
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (valid) {
|
|
|
- that.confirmLoading = true
|
|
|
+ // alert('保存!')
|
|
|
+ console.log('备注信息:', this.costAllocationAdd.noteOne, '计划单号:', this.costAllocationAdd.planNum)
|
|
|
+ // that.$message.success(res.message)
|
|
|
+ that.$message.success('保存成功,数据添加到成本分配汇总')
|
|
|
+ } else {
|
|
|
+ this.$message.info('请选择计划单号、输入备注信息')
|
|
|
}
|
|
|
})
|
|
|
- // 验证通过后,
|
|
|
- // this.getShipmentList() // 刷新 成本分配汇总
|
|
|
-
|
|
|
- this.$router.push('/cost-allocation-total/list') // 暂定跳转页面,客户未确定
|
|
|
- this.close()
|
|
|
},
|
|
|
- // --------------------------------------
|
|
|
- close() {
|
|
|
- this.$emit('close')
|
|
|
- this.visible = false
|
|
|
- this.$refs.form.resetFields()
|
|
|
- },
|
|
|
-
|
|
|
- // --------------------------------------------------
|
|
|
// father 方法
|
|
|
aa() {},
|
|
|
bb() {},
|