|
@@ -58,11 +58,11 @@
|
|
|
<el-row class="my-row">
|
|
|
<el-col :span="15">
|
|
|
<el-form-item label="备注说明" prop="notes">
|
|
|
- <el-input type="textarea"
|
|
|
- v-model="dataForm.notes"
|
|
|
- :rows="4"
|
|
|
+ <el-input type="textarea"
|
|
|
+ v-model="dataForm.notes"
|
|
|
+ :rows="4"
|
|
|
maxlength="300"
|
|
|
- show-word-limit
|
|
|
+ show-word-limit
|
|
|
placeholder="备注说明"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -70,7 +70,7 @@
|
|
|
<el-row class="my-row">
|
|
|
<upload-component :title="'附件'" :accept="'*'" :file-obj-list="fileList" @uploadSuccess="uploadSuccess"/>
|
|
|
</el-row>
|
|
|
-
|
|
|
+
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="onChose">取消</el-button>
|
|
@@ -81,6 +81,7 @@
|
|
|
|
|
|
<script>
|
|
|
import uploadComponent from '../common/upload-component'
|
|
|
+import { getCustomerAccountDetail } from '@/api/finance'
|
|
|
export default {
|
|
|
name: 'customer-account-add-or-update',
|
|
|
components: {
|
|
@@ -131,56 +132,30 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
onChose () {
|
|
|
- console.log(5555)
|
|
|
this.$emit('onChose')
|
|
|
},
|
|
|
async init (id, customerAccount, customerId, formDisable) {
|
|
|
this.visible = true
|
|
|
+ this.fileList = []
|
|
|
this.id = id || 0
|
|
|
this.formDisable = formDisable
|
|
|
- this.fileList = []
|
|
|
if (id && customerAccount) {
|
|
|
- this.dataForm = {
|
|
|
- customerAccountId: id,
|
|
|
- customerAccountCode: customerAccount.customerAccountCode,
|
|
|
- type: customerAccount.type,
|
|
|
- contractNumber: customerAccount.contractNumber,
|
|
|
- receivedPaidTime: customerAccount.receivedPaidTime,
|
|
|
- currency: customerAccount.currency,
|
|
|
- receivedPaidAmount: customerAccount.receivedPaidAmount,
|
|
|
- notes: customerAccount.notes
|
|
|
- }
|
|
|
- customerAccount.attachList && customerAccount.attachList.forEach((item) => {
|
|
|
- this.fileList.push({
|
|
|
- name: item.fileName,
|
|
|
- url: item.url,
|
|
|
- id: item.url
|
|
|
- })
|
|
|
+ getCustomerAccountDetail(id).then(({ data }) => {
|
|
|
+ if (data && data.code === '200') {
|
|
|
+ this.dataForm = data.data
|
|
|
+ }
|
|
|
+ if (data.data.attachList) {
|
|
|
+ data.data.attachList.forEach((item) => {
|
|
|
+ this.fileList.push({
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.url,
|
|
|
+ id: item.url
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
this.dataForm.customerId = customerId
|
|
|
- // await getCustomer().then(({data}) => {
|
|
|
- // if (data && data.code === '200') {
|
|
|
- // this.optionsCus = data.data
|
|
|
- // }
|
|
|
- // })
|
|
|
- // if (!id) return
|
|
|
- // await getSaleInvoiceDetail(this.id).then(({data}) => {
|
|
|
- // if (data && data.code === '200') {
|
|
|
- // this.dataForm = data.data
|
|
|
- // // 文件列表
|
|
|
- // this.fileList = []
|
|
|
- // if (data.data.attachList) {
|
|
|
- // data.data.attachList.forEach((item) => {
|
|
|
- // this.fileList.push({
|
|
|
- // name: item.fileName,
|
|
|
- // url: item.url,
|
|
|
- // id: item.url
|
|
|
- // })
|
|
|
- // })
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
},
|
|
|
validateField (type) {
|
|
|
this.$refs.dataForm.validateField(type)
|