|
@@ -9,6 +9,12 @@
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
<el-button
|
|
|
+ v-if="detailData.seeDisabled"
|
|
|
+ size="small"
|
|
|
+ @click="detailData.seeDisabled = false"
|
|
|
+ type="primary"
|
|
|
+ >编辑</el-button>
|
|
|
+ <el-button
|
|
|
class="el-button--small-yh"
|
|
|
type="warning"
|
|
|
:disabled="detailData.seeDisabled"
|
|
@@ -59,10 +65,16 @@
|
|
|
/>
|
|
|
<!-- 所属公司带出银行信息-->
|
|
|
<selectComponent v-else-if="item.prop === 'belongToCorpId'"
|
|
|
- v-model="form[item.prop]" :configuration="configuration"
|
|
|
+ v-model="form[item.prop]" :configuration="companyConfiguration"
|
|
|
style="width: 100%"
|
|
|
:disabled="detailData.seeDisabled"
|
|
|
@returnBack="returnBack"/>
|
|
|
+<!-- 生产工厂-->
|
|
|
+ <selectComponent v-else-if="item.prop === 'productionPlant'"
|
|
|
+ v-model="form[item.prop]" :configuration="plantConfiguration"
|
|
|
+ style="width: 100%"
|
|
|
+ :disabled="detailData.seeDisabled"
|
|
|
+ @getRow="getPlantRow"/>
|
|
|
<el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
|
|
|
<el-option v-for="(item,index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
|
|
|
</el-select>
|
|
@@ -255,6 +267,29 @@
|
|
|
:disabled="detailData.seeDisabled"
|
|
|
@click.stop="openReport()"
|
|
|
>报 表</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-download"
|
|
|
+ @click="downloadHandle"
|
|
|
+ >下载模板</el-button>
|
|
|
+ <el-upload
|
|
|
+ :action="baseURL"
|
|
|
+ :headers="headers"
|
|
|
+ :disabled="detailData.seeDisabled"
|
|
|
+ :on-progress="uploading"
|
|
|
+ :show-file-list=false
|
|
|
+ accept=".xls,.xlsx"
|
|
|
+ multiple
|
|
|
+ :on-success="importTemplate"
|
|
|
+ style="float: right"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-upload"
|
|
|
+ >导 入</el-button>
|
|
|
+ </el-upload>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
@@ -562,6 +597,8 @@ import customerDialog from "@/components/customer-dialog/main";
|
|
|
//账单组件
|
|
|
import ApplyPayment from "../../../components/finance/applyPayment";
|
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
+import Cookies from 'js-cookie'
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
@@ -597,6 +634,20 @@ export default {
|
|
|
placeholder: '请点击右边按钮选择',
|
|
|
dicData: []
|
|
|
},
|
|
|
+ plantConfiguration: {
|
|
|
+ multipleChoices: false,
|
|
|
+ multiple: false,
|
|
|
+ collapseTags: false,
|
|
|
+ placeholder: '请点击右边按钮选择',
|
|
|
+ dicData: []
|
|
|
+ },
|
|
|
+ companyConfiguration: {
|
|
|
+ multipleChoices: false,
|
|
|
+ multiple: false,
|
|
|
+ collapseTags: false,
|
|
|
+ placeholder: '请点击右边按钮选择',
|
|
|
+ dicData: []
|
|
|
+ },
|
|
|
data: [],
|
|
|
policyForm: {},
|
|
|
dataPolicy: [],
|
|
@@ -983,7 +1034,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '生产工厂',
|
|
|
- prop: 'a',
|
|
|
+ prop: 'productionPlant',
|
|
|
span: 16,
|
|
|
rules: [
|
|
|
{
|
|
@@ -1152,6 +1203,8 @@ export default {
|
|
|
// 查询时loading页面
|
|
|
pageLoading: false,
|
|
|
switchDialog: false,
|
|
|
+ baseURL: '/api/blade-purchase-sales/orderitems/importPrice',
|
|
|
+ headers: { "Blade-Auth": 'Bearer ' + getToken()},
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -1210,7 +1263,10 @@ export default {
|
|
|
this.bankOfDepositData = this.form.orderFilesList
|
|
|
this.configuration.dicData = this.form.corpName
|
|
|
if (this.form.belongToCorpList) {
|
|
|
- this.configuration.dicData = this.configuration.dicData.concat(this.form.belongToCorpList)
|
|
|
+ this.companyConfiguration.dicData = this.form.belongToCorpList
|
|
|
+ }
|
|
|
+ if (this.form.productionPlantList) {
|
|
|
+ this.plantConfiguration.dicData = this.form.productionPlantList
|
|
|
}
|
|
|
let feesData = []
|
|
|
this.form.orderFeesList.forEach(item => {
|
|
@@ -1393,6 +1449,62 @@ export default {
|
|
|
openReport() {
|
|
|
this.switchDialog =! this.switchDialog;
|
|
|
},
|
|
|
+ // 下载模板
|
|
|
+ downloadHandle() {
|
|
|
+ this.$confirm('是否下载模板文件?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ window.open(
|
|
|
+ `/api/blade-purchase-sales/orderitems/exportPrice?${
|
|
|
+ this.website.tokenHeader
|
|
|
+ }=${getToken()}`
|
|
|
+ );
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //文件上传时
|
|
|
+ uploading(event, file, fileList) {
|
|
|
+ this.pageLoading = true;
|
|
|
+ // this.openFullScreen(false, '文件正在解析中');
|
|
|
+ },
|
|
|
+ importTemplate(res, file) {
|
|
|
+ console.log(res)
|
|
|
+ this.pageLoading = false
|
|
|
+ let goodsData = []
|
|
|
+ res.data.forEach(item => {
|
|
|
+ this.$set(item, 'priceType', '一般')
|
|
|
+ this.$set(item, 'actualQuantity', '0')
|
|
|
+ this.$set(item, 'purchaseAmount', '0')
|
|
|
+ this.$set(item, 'price', '0')
|
|
|
+ this.$set(item, 'amount', '0')
|
|
|
+ this.$set(item, 'sort', this.maxFeeNum + 1)
|
|
|
+ this.maxFeeNum++
|
|
|
+ let a = {
|
|
|
+ cname: item.cname,
|
|
|
+ }
|
|
|
+ goodsData.push(a)
|
|
|
+ })
|
|
|
+ this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.concat(goodsData)
|
|
|
+ this.removeGoodsRepeat()
|
|
|
+ this.contactsData = this.contactsData.concat(res.data)
|
|
|
+
|
|
|
+ },
|
|
|
+ //遮罩层
|
|
|
+ openFullScreen(res, text) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: text,
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ });
|
|
|
+ if (res === true) loading.close();
|
|
|
+ },
|
|
|
onClose(val) {
|
|
|
this.switchDialog = val;
|
|
|
},
|
|
@@ -1539,6 +1651,9 @@ export default {
|
|
|
this.$set(this.form, 'packageRemarks', data.remarks)
|
|
|
this.$set(this.form, 'arrivalAddress', data.storageAddr)
|
|
|
},
|
|
|
+ getPlantRow(data) {
|
|
|
+ this.$set(this.form, 'shippingAddress', data.storageAddr)
|
|
|
+ },
|
|
|
getRow(event,row) {
|
|
|
row.priceCategory = event[0].goodsTypeName
|
|
|
this.$set(row, 'priceType', '一般')
|