|
@@ -1,95 +1,53 @@
|
|
|
<template>
|
|
|
<div style="width: 100%; padding: 0px 15px">
|
|
|
- <byForm
|
|
|
- :formConfig="formConfig"
|
|
|
- :formOption="formOption"
|
|
|
- v-model="formData.data"
|
|
|
- :rules="rules"
|
|
|
- ref="submit"
|
|
|
- >
|
|
|
+ <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
|
|
|
<template #btn>
|
|
|
<div>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- v-if="
|
|
|
+ <el-button type="primary" v-if="
|
|
|
[30].includes(route.query.processType) || !route.query.processType
|
|
|
- "
|
|
|
- @click="clickCopy"
|
|
|
- >复制采购合同</el-button
|
|
|
- >
|
|
|
+ " @click="clickCopy">复制采购合同</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #buyer>
|
|
|
<div style="width: 100%">
|
|
|
<el-form-item prop="buyCorporationId">
|
|
|
- <el-select
|
|
|
- v-model="formData.data.buyCorporationId"
|
|
|
- style="width: 100%"
|
|
|
- @change="changeBuyCorporation"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in corporationList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- />
|
|
|
+ <el-select v-model="formData.data.buyCorporationId" style="width: 100%" @change="changeBuyCorporation">
|
|
|
+ <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="地址" prop="buyCountryName">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.buyCountryName"
|
|
|
- placeholder="请输入国家"
|
|
|
- @change="changeAddress"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.buyCountryName" placeholder="请输入国家" @change="changeAddress" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label=" " prop="buyProvinceName">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.buyProvinceName"
|
|
|
- placeholder="请输入省/州"
|
|
|
- @change="changeAddress"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.buyProvinceName" placeholder="请输入省/州" @change="changeAddress" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label=" " prop="buyCityName">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.buyCityName"
|
|
|
- placeholder="请输入城市"
|
|
|
- @change="changeAddress"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.buyCityName" placeholder="请输入城市" @change="changeAddress" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="24">
|
|
|
<el-form-item prop="buyAddress">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.buyAddress"
|
|
|
- type="textarea"
|
|
|
- @change="changeAddress"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.buyAddress" type="textarea" @change="changeAddress" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="联系人" prop="buyContactName">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.buyContactName"
|
|
|
- placeholder="请输入联系人"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.buyContactName" placeholder="请输入联系人" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="16">
|
|
|
<el-form-item label=" " prop="buyContactNumber">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.buyContactNumber"
|
|
|
- placeholder="请输入联系人电话"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -99,117 +57,62 @@
|
|
|
<div style="width: 100%">
|
|
|
<div style="width: 100%">
|
|
|
<el-form-item prop="sellCorporationId">
|
|
|
- <el-select
|
|
|
- v-model="formData.data.sellCorporationId"
|
|
|
- style="width: 100%"
|
|
|
- filterable
|
|
|
- remote
|
|
|
- reserve-keyword
|
|
|
- placeholder="请输入关键字"
|
|
|
- remote-show-suffix
|
|
|
- :remote-method="remoteMethod"
|
|
|
- :loading="loadingSearch"
|
|
|
- @input="remoteMethod"
|
|
|
- @change="changeSupplier"
|
|
|
- v-if="
|
|
|
+ <el-select v-model="formData.data.sellCorporationId" style="width: 100%" filterable remote reserve-keyword placeholder="请输入关键字"
|
|
|
+ remote-show-suffix :remote-method="remoteMethod" :loading="loadingSearch" @input="remoteMethod" @change="changeSupplier"
|
|
|
+ v-if="
|
|
|
[30].includes(route.query.processType) ||
|
|
|
!route.query.processType
|
|
|
- "
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in supplierList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- />
|
|
|
+ ">
|
|
|
+ <el-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
- <el-select
|
|
|
- v-model="formData.data.sellCorporationName"
|
|
|
- disabled
|
|
|
- v-else
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
+ <el-select v-model="formData.data.sellCorporationName" disabled v-else style="width: 100%">
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="地址" prop="countryId">
|
|
|
- <el-select
|
|
|
- v-model="formData.data.countryId"
|
|
|
- placeholder="国家"
|
|
|
- filterable
|
|
|
- @change="(val) => changeSellAddress(val, '20')"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in countryData"
|
|
|
- :label="item.chineseName"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
+ <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => changeSellAddress(val, '20')">
|
|
|
+ <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label=" " prop="provinceName">
|
|
|
- <selectCity
|
|
|
- placeholder="省/洲"
|
|
|
- @change="(val) => changeSellAddress(val, '30')"
|
|
|
- addressId="provinceId"
|
|
|
- addressName="provinceName"
|
|
|
- v-model="formData.data"
|
|
|
- :data="provinceData"
|
|
|
- >
|
|
|
+ <selectCity placeholder="省/洲" @change="(val) => changeSellAddress(val, '30')" addressId="provinceId" addressName="provinceName"
|
|
|
+ v-model="formData.data" :data="provinceData">
|
|
|
</selectCity>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label=" " prop="cityName">
|
|
|
- <selectCity
|
|
|
- placeholder="城市"
|
|
|
- addressId="cityId"
|
|
|
- addressName="cityName"
|
|
|
- v-model="formData.data"
|
|
|
- :data="cityData"
|
|
|
- @change="changeAddress"
|
|
|
- >
|
|
|
+ <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"
|
|
|
+ @change="changeAddress">
|
|
|
</selectCity>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label=" " prop="sellPostalCode">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.sellPostalCode"
|
|
|
- placeholder="请输入邮编"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.sellPostalCode" placeholder="请输入邮编" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="24">
|
|
|
<el-form-item prop="sellAddress">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.sellAddress"
|
|
|
- type="textarea"
|
|
|
- @change="changeAddress"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.sellAddress" type="textarea" @change="changeAddress" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="联系人" prop="sellContactName">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.sellContactName"
|
|
|
- placeholder="请输入联系人"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="16">
|
|
|
<el-form-item label=" " prop="sellContactNumber">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.sellContactNumber"
|
|
|
- placeholder="请输入联系人电话"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -221,33 +124,15 @@
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="付款方式" prop="paymentMethod">
|
|
|
- <el-select
|
|
|
- v-model="formData.data.paymentMethod"
|
|
|
- placeholder="请选择付款方式"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in fundsPaymentMethod"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- />
|
|
|
+ <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
|
|
|
+ <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="发票类型" prop="invoiceType">
|
|
|
- <el-select
|
|
|
- v-model="formData.data.invoiceType"
|
|
|
- placeholder="请选择发票类型"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in invoiceType"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- />
|
|
|
+ <el-select v-model="formData.data.invoiceType" placeholder="请选择发票类型" style="width: 100%">
|
|
|
+ <el-option v-for="item in invoiceType" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -259,17 +144,8 @@
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="交货类型" prop="deliveryType">
|
|
|
- <el-radio-group
|
|
|
- v-model="formData.data.deliveryType"
|
|
|
- @change="changeAddress"
|
|
|
- >
|
|
|
- <el-radio
|
|
|
- v-for="(item, index) in deliveryType"
|
|
|
- :key="index"
|
|
|
- :label="item.value"
|
|
|
- border
|
|
|
- >{{ item.label }}</el-radio
|
|
|
- >
|
|
|
+ <el-radio-group v-model="formData.data.deliveryType" @change="changeAddress">
|
|
|
+ <el-radio v-for="(item, index) in deliveryType" :key="index" :label="item.value" border>{{ item.label }}</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -277,85 +153,48 @@
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="详细地址" prop="address">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.address"
|
|
|
- :rows="2"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入详细地址"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.data.address" :rows="2" type="textarea" placeholder="请输入详细地址" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="交付日期" prop="deliveryTime">
|
|
|
- <el-date-picker
|
|
|
- v-model="formData.data.deliveryTime"
|
|
|
- type="date"
|
|
|
- placeholder="请选择交付日期"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- />
|
|
|
+ <el-date-picker v-model="formData.data.deliveryTime" type="date" placeholder="请选择交付日期" value-format="YYYY-MM-DD" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="质保期 (天)" prop="warranty">
|
|
|
- <el-input-number
|
|
|
- onmousewheel="return false;"
|
|
|
- v-model="formData.data.warranty"
|
|
|
- placeholder="请输入质保期"
|
|
|
- style="width: 100%"
|
|
|
- :precision="0"
|
|
|
- :controls="false"
|
|
|
- :min="0"
|
|
|
- />
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="formData.data.warranty" placeholder="请输入质保期" style="width: 100%" :precision="0"
|
|
|
+ :controls="false" :min="0" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #commodity>
|
|
|
- <div
|
|
|
- style="width: 100%"
|
|
|
- v-if="
|
|
|
+ <div style="width: 100%" v-if="
|
|
|
formData.data.purchaseProductList &&
|
|
|
formData.data.purchaseProductList.length > 0
|
|
|
- "
|
|
|
- >
|
|
|
- <div
|
|
|
- :style="
|
|
|
+ ">
|
|
|
+ <div :style="
|
|
|
index !== formData.data.purchaseProductList.length - 1
|
|
|
? 'margin-bottom: 20px'
|
|
|
: ''
|
|
|
- "
|
|
|
- v-for="(item, index) in formData.data.purchaseProductList"
|
|
|
- :key="item.dataResourceId"
|
|
|
- >
|
|
|
- <div
|
|
|
- style="
|
|
|
+ " v-for="(item, index) in formData.data.purchaseProductList" :key="item.dataResourceId">
|
|
|
+ <div style="
|
|
|
border: 1px solid #ccc;
|
|
|
padding: 20px 10px 0 10px;
|
|
|
width: 100%;
|
|
|
- "
|
|
|
- >
|
|
|
- <el-row
|
|
|
- style="
|
|
|
+ ">
|
|
|
+ <el-row style="
|
|
|
width: 100%;
|
|
|
font-weight: 700;
|
|
|
background: #eee;
|
|
|
padding: 10px 0px;
|
|
|
- "
|
|
|
- :gutter="5"
|
|
|
- type="flex"
|
|
|
- align="middle"
|
|
|
- >
|
|
|
+ " :gutter="5" type="flex" align="middle">
|
|
|
<el-col :span="1" style="text-align: center">
|
|
|
- <img
|
|
|
- v-if="item.fileUrl"
|
|
|
- :src="item.fileUrl"
|
|
|
- class="pic"
|
|
|
- style="width: 30px; height: 30px"
|
|
|
- @click="onPicture(item.fileUrl)"
|
|
|
- />
|
|
|
+ <img v-if="item.fileUrl" :src="item.fileUrl" class="pic" style="width: 30px; height: 30px" @click="onPicture(item.fileUrl)" />
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<span>产品名称: {{ item.productName }}</span>
|
|
@@ -380,38 +219,21 @@
|
|
|
@click="handleHandover(item, index)"
|
|
|
>编辑备注</el-button
|
|
|
> -->
|
|
|
- <div
|
|
|
- style="color: #409eff; cursor: pointer"
|
|
|
- @click="handleHandover(item, index)"
|
|
|
- >
|
|
|
+ <div style="color: #409eff; cursor: pointer" @click="handleHandover(item, index)">
|
|
|
编辑备注
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="2">
|
|
|
- <el-button type="primary" text @click="handleMaterial(index)"
|
|
|
- >添加配件</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" text @click="handleMaterial(index)">添加配件</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-collapse
|
|
|
- v-model="item.activeName"
|
|
|
- class="hideCollapse"
|
|
|
- accordion
|
|
|
- >
|
|
|
+ <el-collapse v-model="item.activeName" class="hideCollapse" accordion>
|
|
|
<el-collapse-item title="" :name="true">
|
|
|
<div style="padding: 0 40px">
|
|
|
- <el-table
|
|
|
- :data="item.purchaseProductMountingsList"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
+ <el-table :data="item.purchaseProductMountingsList" style="width: 100%">
|
|
|
<el-table-column label="图片" align="center" width="80">
|
|
|
<template #default="{ row }">
|
|
|
- <img
|
|
|
- v-if="row.fileUrl"
|
|
|
- :src="row.fileUrl"
|
|
|
- class="pic"
|
|
|
- @click="onPicture(row.fileUrl)"
|
|
|
- />
|
|
|
+ <img v-if="row.fileUrl" :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="类型" align="center" width="80">
|
|
@@ -421,43 +243,24 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="产品名称"
|
|
|
- prop="productName"
|
|
|
- min-width="180"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="尺寸"
|
|
|
- prop="productModel"
|
|
|
- min-width="140"
|
|
|
- />
|
|
|
+ <el-table-column label="产品名称" prop="productName" min-width="180" />
|
|
|
+ <el-table-column label="尺寸" prop="productModel" min-width="140" />
|
|
|
<el-table-column label="单价" width="140">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%" class="removePadding">
|
|
|
- <el-form-item
|
|
|
- :prop="
|
|
|
+ <el-form-item :prop="
|
|
|
'purchaseProductList.' +
|
|
|
index +
|
|
|
'.purchaseProductMountingsList.' +
|
|
|
$index +
|
|
|
'.price'
|
|
|
- "
|
|
|
- :rules="rules.price"
|
|
|
- :inline-message="true"
|
|
|
- @change="
|
|
|
+ " :rules="rules.price" :inline-message="true" @change="
|
|
|
() => {
|
|
|
return changeProductMaterial(index, $index);
|
|
|
}
|
|
|
- "
|
|
|
- >
|
|
|
- <el-input-number
|
|
|
- onmousewheel="return false;"
|
|
|
- v-model="row.price"
|
|
|
- placeholder="请输入单价"
|
|
|
- :precision="2"
|
|
|
- :controls="false"
|
|
|
- :min="0"
|
|
|
- />
|
|
|
+ ">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入单价" :precision="2" :controls="false"
|
|
|
+ :min="0" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -465,49 +268,27 @@
|
|
|
<el-table-column label="数量" width="140">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%" class="removePadding">
|
|
|
- <el-form-item
|
|
|
- :prop="
|
|
|
+ <el-form-item :prop="
|
|
|
'purchaseProductList.' +
|
|
|
index +
|
|
|
'.purchaseProductMountingsList.' +
|
|
|
$index +
|
|
|
'.quantity'
|
|
|
- "
|
|
|
- :rules="rules.quantity"
|
|
|
- :inline-message="true"
|
|
|
- @change="
|
|
|
+ " :rules="rules.quantity" :inline-message="true" @change="
|
|
|
() => {
|
|
|
return changeProductMaterial(index, $index);
|
|
|
}
|
|
|
- "
|
|
|
- >
|
|
|
- <el-input-number
|
|
|
- onmousewheel="return false;"
|
|
|
- v-model="row.quantity"
|
|
|
- placeholder="请输入数量"
|
|
|
- :precision="0"
|
|
|
- :controls="false"
|
|
|
- :min="0"
|
|
|
- />
|
|
|
+ ">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入数量" :precision="0"
|
|
|
+ :controls="false" :min="0" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="金额" prop="amount" width="100" />
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- width="80"
|
|
|
- fixed="right"
|
|
|
- >
|
|
|
+ <el-table-column label="操作" align="center" width="80" fixed="right">
|
|
|
<template #default="{ $index }">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- v-if="$index !== 0"
|
|
|
- link
|
|
|
- @click="handleRemove(index, $index)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" v-if="$index !== 0" link @click="handleRemove(index, $index)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -515,33 +296,26 @@
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
<div style="text-align: center; margin-top: -18px">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="item.activeName = !item.activeName"
|
|
|
- style="margin-bottom: -28px; background: #fff"
|
|
|
- text
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="item.activeName = !item.activeName" style="margin-bottom: -28px; background: #fff" text>
|
|
|
<span v-if="item.activeName">
|
|
|
<span style="vertical-align: middle">收起明细</span>
|
|
|
- <el-icon
|
|
|
- style="
|
|
|
+ <el-icon style="
|
|
|
margin-left: 8px;
|
|
|
transform: rotate(-90deg);
|
|
|
vertical-align: middle;
|
|
|
- "
|
|
|
- ><DArrowRight
|
|
|
- /></el-icon>
|
|
|
+ ">
|
|
|
+ <DArrowRight />
|
|
|
+ </el-icon>
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
<span style="vertical-align: middle">查看明细</span>
|
|
|
- <el-icon
|
|
|
- style="
|
|
|
+ <el-icon style="
|
|
|
margin-left: 8px;
|
|
|
transform: rotate(90deg);
|
|
|
vertical-align: middle;
|
|
|
- "
|
|
|
- ><DArrowRight
|
|
|
- /></el-icon>
|
|
|
+ ">
|
|
|
+ <DArrowRight />
|
|
|
+ </el-icon>
|
|
|
</span>
|
|
|
</el-button>
|
|
|
</div>
|
|
@@ -552,25 +326,13 @@
|
|
|
<template #otherCharge>
|
|
|
<div style="width: 100%">
|
|
|
<el-button type="primary" @click="clickAdd()">添加行</el-button>
|
|
|
- <el-table
|
|
|
- :data="formData.data.purchaseProjectList"
|
|
|
- style="width: 100%; margin-top: 16px"
|
|
|
- >
|
|
|
+ <el-table :data="formData.data.purchaseProjectList" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column label="收费项目" width="220">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'purchaseProjectList.' + $index + '.payName'"
|
|
|
- :rules="rules.payName"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
- <el-autocomplete
|
|
|
- v-model="row.payName"
|
|
|
- :fetch-suggestions="querySearch"
|
|
|
- clearable
|
|
|
- class="inline-input w-50"
|
|
|
- placeholder="请输入收费项目"
|
|
|
- />
|
|
|
+ <el-form-item :prop="'purchaseProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
|
|
|
+ <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50"
|
|
|
+ placeholder="请输入收费项目" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -578,9 +340,7 @@
|
|
|
<el-table-column label="备注">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'purchaseProjectList.' + $index + '.remark'"
|
|
|
- >
|
|
|
+ <el-form-item :prop="'purchaseProjectList.' + $index + '.remark'">
|
|
|
<el-input v-model="row.remark" placeholder="请输入备注" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -589,35 +349,17 @@
|
|
|
<el-table-column label="金额" width="130">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'purchaseProjectList.' + $index + '.amount'"
|
|
|
- :rules="rules.amount"
|
|
|
- :inline-message="true"
|
|
|
- class="shrinkPadding"
|
|
|
- @change="changeProject"
|
|
|
- >
|
|
|
- <el-input-number
|
|
|
- onmousewheel="return false;"
|
|
|
- v-model="row.amount"
|
|
|
- placeholder="请输入金额"
|
|
|
- style="width: 100%"
|
|
|
- :precision="2"
|
|
|
- :controls="false"
|
|
|
- />
|
|
|
+ <el-form-item :prop="'purchaseProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true" class="shrinkPadding"
|
|
|
+ @change="changeProject">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- width="60"
|
|
|
- align="center"
|
|
|
- fixed="right"
|
|
|
- >
|
|
|
+ <el-table-column label="操作" width="60" align="center" fixed="right">
|
|
|
<template #default="{ $index }">
|
|
|
- <el-button type="primary" link @click="handleDelete($index)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -627,16 +369,8 @@
|
|
|
<div style="width: 100%; display: flex">
|
|
|
<div style="width: calc(100% - 190px)"></div>
|
|
|
<div style="width: 130px; padding: 0 12px">
|
|
|
- <el-form-item
|
|
|
- label="合同总金额"
|
|
|
- prop="amount"
|
|
|
- class="shrinkPadding"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="formData.data.amount"
|
|
|
- placeholder="合同总金额"
|
|
|
- disabled
|
|
|
- />
|
|
|
+ <el-form-item label="合同总金额" prop="amount" class="shrinkPadding">
|
|
|
+ <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -646,17 +380,8 @@
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="合同模板" prop="contractTemplateId">
|
|
|
- <el-select
|
|
|
- v-model="formData.data.contractTemplateId"
|
|
|
- style="width: 100%"
|
|
|
- @change="changeContractTemplate"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in templateList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- />
|
|
|
+ <el-select v-model="formData.data.contractTemplateId" style="width: 100%" @change="changeContractTemplate">
|
|
|
+ <el-option v-for="item in templateList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -666,39 +391,21 @@
|
|
|
<!-- <div v-if="judgeStatus()">
|
|
|
<div v-html="getHtmlVal(formData.data.remark)"></div>
|
|
|
</div> -->
|
|
|
- <Editor
|
|
|
- style="width: 100%"
|
|
|
- :value="formData.data.remark"
|
|
|
- @updateValue="updateContent"
|
|
|
- :readOnly="judgeStatus()"
|
|
|
- ref="remarkEditor"
|
|
|
- />
|
|
|
+ <Editor style="width: 100%" :value="formData.data.remark" @updateValue="updateContent" :readOnly="judgeStatus()" ref="remarkEditor" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #shipment>
|
|
|
<div style="width: 100%">
|
|
|
- <el-table
|
|
|
- :data="formData.data.purchaseArrivalList"
|
|
|
- style="width: 100%; margin-top: 16px"
|
|
|
- >
|
|
|
+ <el-table :data="formData.data.purchaseArrivalList" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column prop="productCode" label="商品编码" width="120" />
|
|
|
<el-table-column prop="productName" label="商品名称" />
|
|
|
<el-table-column label="到货日期" width="220">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'purchaseArrivalList.' + $index + '.arrivalTime'"
|
|
|
- :rules="rules.arrivalTime"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
- <el-date-picker
|
|
|
- v-model="row.arrivalTime"
|
|
|
- type="date"
|
|
|
- placeholder="请选择到货日期"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- />
|
|
|
+ <el-form-item :prop="'purchaseArrivalList.' + $index + '.arrivalTime'" :rules="rules.arrivalTime" :inline-message="true">
|
|
|
+ <el-date-picker v-model="row.arrivalTime" type="date" placeholder="请选择到货日期" value-format="YYYY-MM-DD" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -706,36 +413,17 @@
|
|
|
<el-table-column label="到货数量" width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'purchaseArrivalList.' + $index + '.quantity'"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
- <el-input-number
|
|
|
- onmousewheel="return false;"
|
|
|
- v-model="row.quantity"
|
|
|
- placeholder="请输入到货数量"
|
|
|
- style="width: 100%"
|
|
|
- :precision="0"
|
|
|
- :controls="false"
|
|
|
- :min="0"
|
|
|
- />
|
|
|
+ <el-form-item :prop="'purchaseArrivalList.' + $index + '.quantity'" :inline-message="true">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入到货数量" style="width: 100%" :precision="0"
|
|
|
+ :controls="false" :min="0" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- label="操作"
|
|
|
- width="120"
|
|
|
- fixed="right"
|
|
|
- >
|
|
|
+ <el-table-column align="center" label="操作" width="120" fixed="right">
|
|
|
<template #default="{ row, $index }">
|
|
|
- <el-button type="primary" link @click="clickSplit(row)"
|
|
|
- >拆分</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" link @click="clickDelete($index)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" link @click="clickSplit(row)">拆分</el-button>
|
|
|
+ <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -743,69 +431,33 @@
|
|
|
</template>
|
|
|
</byForm>
|
|
|
|
|
|
- <el-dialog
|
|
|
- v-if="openMaterialCompany"
|
|
|
- v-model="openMaterialCompany"
|
|
|
- title="公司产品库"
|
|
|
- width="90%"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <ProductMaterial
|
|
|
- :selectStatus="true"
|
|
|
- @selectMaterial="selectMaterial"
|
|
|
- ></ProductMaterial>
|
|
|
+ <el-dialog v-if="openMaterialCompany" v-model="openMaterialCompany" title="公司产品库" width="90%" append-to-body>
|
|
|
+ <ProductMaterial :selectStatus="true" @selectMaterial="selectMaterial"></ProductMaterial>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="备注"
|
|
|
- v-if="openHandover"
|
|
|
- v-model="openHandover"
|
|
|
- width="800"
|
|
|
- >
|
|
|
- <byForm
|
|
|
- :formConfig="formHandoverConfig"
|
|
|
- :formOption="formOption"
|
|
|
- v-model="productRow.data"
|
|
|
- >
|
|
|
+ <el-dialog title="备注" v-if="openHandover" v-model="openHandover" width="800">
|
|
|
+ <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
|
|
|
<template #file>
|
|
|
<div style="width: 100%">
|
|
|
- <el-upload
|
|
|
- v-model:fileList="fileList"
|
|
|
- action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
- :data="uploadData"
|
|
|
- multiple
|
|
|
- :before-upload="uploadFile"
|
|
|
- :on-success="handleSuccess"
|
|
|
- :on-preview="onPreviewFile"
|
|
|
- >
|
|
|
+ <el-upload v-model:fileList="fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData" multiple
|
|
|
+ :before-upload="uploadFile" :on-success="handleSuccess" :on-preview="onPreviewFile">
|
|
|
<el-button>选择</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #remark>
|
|
|
<div style="width: 100%">
|
|
|
- <Editor
|
|
|
- :value="productRow.data.remark"
|
|
|
- @updateValue="updateHandover"
|
|
|
- />
|
|
|
+ <Editor :value="productRow.data.remark" @updateValue="updateHandover" />
|
|
|
</div>
|
|
|
</template>
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="openHandover = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitHandoverForm()" size="large"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitHandoverForm()" size="large">确 定</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- v-if="copyContract"
|
|
|
- v-model="copyContract"
|
|
|
- title="采购合同选择"
|
|
|
- width="90%"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
+ <el-dialog v-if="copyContract" v-model="copyContract" title="采购合同选择" width="90%" append-to-body>
|
|
|
<SelectPurchase @select="selectPurchase"></SelectPurchase>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -1421,27 +1073,27 @@ const handleSubmit = async () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (
|
|
|
- formData.data.purchaseArrivalList &&
|
|
|
- formData.data.purchaseArrivalList.length > 0
|
|
|
- ) {
|
|
|
- for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
|
|
|
- let data = formData.data.purchaseArrivalList.filter(
|
|
|
- (item) =>
|
|
|
- item.productId === formData.data.purchaseProductList[i].productId
|
|
|
- );
|
|
|
- if (data && data.length > 0) {
|
|
|
- let quantity = 0;
|
|
|
- for (let j = 0; j < data.length; j++) {
|
|
|
- quantity = parseFloat(Number(quantity) + Number(data[j].quantity));
|
|
|
- }
|
|
|
- if (quantity > formData.data.purchaseProductList[i].quantity) {
|
|
|
- ElMessage("到货数量不能大于采购数量");
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (
|
|
|
+ // formData.data.purchaseArrivalList &&
|
|
|
+ // formData.data.purchaseArrivalList.length > 0
|
|
|
+ // ) {
|
|
|
+ // for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
|
|
|
+ // let data = formData.data.purchaseArrivalList.filter(
|
|
|
+ // (item) =>
|
|
|
+ // item.productId === formData.data.purchaseProductList[i].productId
|
|
|
+ // );
|
|
|
+ // if (data && data.length > 0) {
|
|
|
+ // let quantity = 0;
|
|
|
+ // for (let j = 0; j < data.length; j++) {
|
|
|
+ // quantity = parseFloat(Number(quantity) + Number(data[j].quantity));
|
|
|
+ // }
|
|
|
+ // if (quantity > formData.data.purchaseProductList[i].quantity) {
|
|
|
+ // ElMessage("到货数量不能大于采购数量");
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
return true;
|
|
|
} else {
|
|
|
setTimeout(() => {
|