Browse Source

2024-07-23

master
qiezi 2 years ago
parent
commit
ea7a858674
  1. 6
      src/views/modules/code/generation.vue
  2. 44
      src/views/modules/quotation/sellForQuotation.vue
  3. 17
      src/views/modules/quotation/sellForQuotation/quotationDetail/costPrice.vue
  4. 22
      src/views/modules/quotation/sellForQuotation/quoteDetail.vue
  5. 4
      src/views/modules/test/file/testFile.vue

6
src/views/modules/code/generation.vue

@ -284,8 +284,7 @@ export default {
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<!-- {{codeItemDefs}}-->
<div style="margin-top: 10px;border-top: 1px solid #ccc;padding-top: 10px;height: 680px;overflow-y: auto" :style="{width: `${width}px`}">
<div style="margin-top: 10px;border-top: 1px solid #ccc;padding-top: 10px;height: 680px;overflow-y: auto;width: 100%" >
<el-form label-position="left" label-width="100px"> <el-form label-position="left" label-width="100px">
<el-form-item :label="`${item.itemDesc}:`" v-for="(item, index) in codeItemDefs" :key="index" style="margin-bottom: 10px"> <el-form-item :label="`${item.itemDesc}:`" v-for="(item, index) in codeItemDefs" :key="index" style="margin-bottom: 10px">
<div v-if="item.itemType.includes('或')" style="width: 240px;display: inline-block"> <div v-if="item.itemType.includes('或')" style="width: 240px;display: inline-block">
@ -300,6 +299,7 @@ export default {
:loading="loadingIndex === index" :loading="loadingIndex === index"
:ref="`codeItemValue${index}`" :ref="`codeItemValue${index}`"
clearable v-if="codeItemTypes[index] === '选择'" clearable v-if="codeItemTypes[index] === '选择'"
filterable
@change="changeRowCodeItemValue(index)" @change="changeRowCodeItemValue(index)"
@visible-change="(val)=>changeCodeItemValue(index,val)" @visible-change="(val)=>changeCodeItemValue(index,val)"
style="width: 100%;" style="width: 100%;"
@ -309,7 +309,7 @@ export default {
<el-input v-if="codeItemTypes[index] === '手工'" placeholder="请输入" v-model="codeItemValues[index]"></el-input> <el-input v-if="codeItemTypes[index] === '手工'" placeholder="请输入" v-model="codeItemValues[index]"></el-input>
<el-input v-if="codeItemTypes[index] === '流水号'" disabled v-model="codeItemValues[index]"></el-input> <el-input v-if="codeItemTypes[index] === '流水号'" disabled v-model="codeItemValues[index]"></el-input>
</div> </div>
<div style="width: 90px;display: inline-block" v-if="showConditionName(item.itemValues) !== ''">
<div style="display: inline-block" v-if="showConditionName(item.itemValues) !== ''">
<span v-if="">(</span><span>{{showConditionName(item.itemValues)}}</span><span>)</span> <span v-if="">(</span><span>{{showConditionName(item.itemValues)}}</span><span>)</span>
</div> </div>
</el-form-item> </el-form-item>

44
src/views/modules/quotation/sellForQuotation.vue

@ -178,8 +178,8 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="internalInquiryNo"> <el-form-item prop="internalInquiryNo">
<span slot="label" style="" @click="quotationNoDialogFlag = true"><a herf="#">内部询价单号</a></span>
<el-input v-model="insertData.internalInquiryNo" clearable/>
<span slot="label" style="" @click="clickInternalInquiryNoHandle"><a herf="#">内部询价单号</a></span>
<el-input v-model="insertData.internalInquiryNo" @blur="blurInternalInquiryNoHandle" clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
@ -191,9 +191,9 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="customerNo" label="客户编码"> <el-form-item prop="customerNo" label="客户编码">
<span slot="label" style="" v-if="insertData.internalInquiryBatchNo ===''" @click="getBaseList(102,1)"><a
<span slot="label" style="" v-if="insertData.internalInquiryNo ===''" @click="getBaseList(102,1)"><a
herf="#">客户编码</a></span> herf="#">客户编码</a></span>
<el-input v-model="insertData.customerNo" :disabled="insertData.internalInquiryBatchNo !==''"
<el-input v-model="insertData.customerNo" :disabled="insertData.internalInquiryNo !==''"
clearable @change="clearCustomer"/> clearable @change="clearCustomer"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -206,10 +206,10 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="projectId" label="项目编码"> <el-form-item prop="projectId" label="项目编码">
<span slot="label" style="" v-if="insertData.customerNo !=='' && insertData.internalInquiryBatchNo ===''"
<span slot="label" style="" v-if="insertData.customerNo !=='' && insertData.internalInquiryNo ===''"
@click="clickProject"><a herf="#">项目编码</a></span> @click="clickProject"><a herf="#">项目编码</a></span>
<el-input v-model="insertData.projectId" <el-input v-model="insertData.projectId"
:disabled="insertData.customerNo ==='' || insertData.internalInquiryBatchNo !==''"
:disabled="insertData.customerNo ==='' || insertData.internalInquiryNo !==''"
clearable/> clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -234,7 +234,7 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="货币" prop="currency"> <el-form-item label="货币" prop="currency">
<el-input v-model="insertData.currency" :disabled="insertData.internalInquiryBatchNo !==''"
<el-input v-model="insertData.currency" :disabled="insertData.internalInquiryNo !==''"
clearable/> clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -263,9 +263,9 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="采购专员" prop="trackerName"> <el-form-item label="采购专员" prop="trackerName">
<!-- <el-form-item prop="tracker" label="采购专员">--> <!-- <el-form-item prop="tracker" label="采购专员">-->
<span slot="label" style="" v-if="insertData.internalInquiryBatchNo ===''" @click="getBaseList(2000)"><a
<span slot="label" style="" v-if="insertData.internalInquiryNo ===''" @click="getBaseList(2000)"><a
herf="#">采购专员</a></span> herf="#">采购专员</a></span>
<el-input v-model="insertData.trackerName" :disabled="insertData.internalInquiryBatchNo !==''"
<el-input v-model="insertData.trackerName" :disabled="insertData.internalInquiryNo !==''"
@clear="clearTracker" readonly clearable/> @clear="clearTracker" readonly clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -784,6 +784,10 @@ export default {
this.$message.warning("客户编码不存在") this.$message.warning("客户编码不存在")
return return
} }
this.searchProjectData.projectId = this.insertData.projectId
// setTimeout(()=>{
// this.searchProjectData.projectId = ''
// },200)
this.chooseProjectListFlag = true this.chooseProjectListFlag = true
}, },
projectClickRow(row) { projectClickRow(row) {
@ -1211,6 +1215,28 @@ export default {
return {'background-color': '#E8F7F6'} return {'background-color': '#E8F7F6'}
} }
}, },
clickInternalInquiryNoHandle(){
this.quotationNoSearchData.quotationNo = this.insertData.internalInquiryNo;
// setTimeout(()=>{
// this.quotationNoSearchData.quotationNo = ''
// },200)
this.quotationNoDialogFlag = true
},
blurInternalInquiryNoHandle(){
let params = {
quotationNo:this.insertData.internalInquiryNo,
site:this.$store.state.user.site
}
searchQuotationByQuotationNo(params).then(({data}) => {
if (data && data.code === 0){
// this.quotationNoData = data.data;
let rows = data.data
if (rows.length === 1){
this.dblclickQuotationNo(rows[0])
}
}
})
}
}, },
computed: {}, computed: {},
watch: { watch: {

17
src/views/modules/quotation/sellForQuotation/quotationDetail/costPrice.vue

@ -74,6 +74,8 @@ export default {
{label: "detailProfitRate", value: "利润率"}, {label: "detailProfitRate", value: "利润率"},
{label: "finalUntaxedPrice", value: "最终去税价格"}, {label: "finalUntaxedPrice", value: "最终去税价格"},
], ],
copyPackCost:0,
copyShippingCost:0,
} }
}, },
computed: { computed: {
@ -105,7 +107,6 @@ export default {
}, },
rulesValidateLabel(objects, labels) { rulesValidateLabel(objects, labels) {
for (let filed in objects) { for (let filed in objects) {
console.log(filed)
for (let i = 0; i < labels.length; i++) { for (let i = 0; i < labels.length; i++) {
let quotationToolColumn = labels[i]; let quotationToolColumn = labels[i];
if (quotationToolColumn.label === filed) { if (quotationToolColumn.label === filed) {
@ -142,6 +143,8 @@ export default {
this.copyDetail.adjustToolCost = new Decimal(this.copyDetail.adjustToolCost.toFixed(4,Decimal.ROUND_HALF_UP)).toNumber() this.copyDetail.adjustToolCost = new Decimal(this.copyDetail.adjustToolCost.toFixed(4,Decimal.ROUND_HALF_UP)).toNumber()
// //
this.copyDetail.detailOtherCost = new Decimal(new Decimal(new Decimal(this.shippingCost).add(new Decimal(this.packCost)).mul(new Decimal(this.detail.quotationDetailQuantity))).toFixed(4,Decimal.ROUND_HALF_UP)).toSignificantDigits().toNumber() this.copyDetail.detailOtherCost = new Decimal(new Decimal(new Decimal(this.shippingCost).add(new Decimal(this.packCost)).mul(new Decimal(this.detail.quotationDetailQuantity))).toFixed(4,Decimal.ROUND_HALF_UP)).toSignificantDigits().toNumber()
this.copyPackCost = new Decimal(new Decimal(new Decimal(new Decimal(this.packCost)).mul(new Decimal(this.detail.quotationDetailQuantity))).toFixed(4,Decimal.ROUND_HALF_UP)).toSignificantDigits().toNumber()
this.copyShippingCost = new Decimal(new Decimal(new Decimal(this.shippingCost).mul(new Decimal(this.detail.quotationDetailQuantity))).toFixed(4,Decimal.ROUND_HALF_UP)).toSignificantDigits().toNumber()
// //
if (!this.copyDetail.detailManageCost){ if (!this.copyDetail.detailManageCost){
this.copyDetail.detailManageCost = 0; this.copyDetail.detailManageCost = 0;
@ -297,6 +300,18 @@ export default {
v-model="copyDetail.detailManageCost" :step="0" :precision="4" :min="0"/> v-model="copyDetail.detailManageCost" :step="0" :precision="4" :min="0"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-form-item label="包装成本:" >
<el-input-number style="width: 100%;margin-top: -5px;" :controls="false"
v-model="copyPackCost" :step="0" :precision="4" :min="0" disabled/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="运输成本:" >
<el-input-number style="width: 100%;margin-top: -5px;" :controls="false"
v-model="copyShippingCost" :step="0" :precision="4" :min="0" disabled/>
</el-form-item>
</el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="其他成本:" prop="detailOtherCost"> <el-form-item label="其他成本:" prop="detailOtherCost">
<el-input-number style="width: 100%;margin-top: -5px;" :controls="false" @blur="computeAllCost" <el-input-number style="width: 100%;margin-top: -5px;" :controls="false" @blur="computeAllCost"

22
src/views/modules/quotation/sellForQuotation/quoteDetail.vue

@ -879,6 +879,20 @@ export default {
} }
}) })
}, },
blurProjectHandle(){
let params = {
site:this.$store.state.user.site,
testPartNo:this.quotationDetail.productNo,
projectId: this.header.projectId
}
getProjectPartList(params).then(({data})=>{
if (data && data.code === 0){
if (data.rows && data.rows.length === 1){
this.dblClickProjectPartTable(data.rows[0])
}
}
})
},
// //
dblClickProjectPartTable(row){ dblClickProjectPartTable(row){
this.quotationDetail.productNo = row.testPartNo; this.quotationDetail.productNo = row.testPartNo;
@ -997,6 +1011,10 @@ export default {
}).catch((error)=>{ }).catch((error)=>{
this.$message.error(error); this.$message.error(error);
}) })
},
clickProjectHandle(){
this.projectPartData.testPartNo = this.quotationDetail.productNo
this.projectPartDialogFlag = true
} }
}, },
} }
@ -1060,8 +1078,8 @@ export default {
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="产品编码" prop="productNo"> <el-form-item label="产品编码" prop="productNo">
<span slot="label" style="" @click="projectPartDialogFlag = true"><a>产品编码</a></span>
<el-input v-model="quotationDetail.productNo" clearable/>
<span slot="label" style="" @click="clickProjectHandle"><a>产品编码</a></span>
<el-input v-model="quotationDetail.productNo" @blur="blurProjectHandle" clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">

4
src/views/modules/test/file/testFile.vue

@ -111,7 +111,7 @@ export default {
// } else { // } else {
// type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; // type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
// } // }
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
this.$message.warning(`该文件格式暂不支持预览`)
return return
} }
@ -121,7 +121,7 @@ export default {
} }
if (type === ''){ if (type === ''){
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
this.$message.warning(`该文件格式暂不支持预览`)
return; return;
} }
downLoadQuotationFile(row).then(({data}) => { downLoadQuotationFile(row).then(({data}) => {

Loading…
Cancel
Save