|
@@ -34,6 +34,7 @@
|
|
|
v-model="dataForm.coType"
|
|
|
:disabled="display"
|
|
|
remote
|
|
|
+ @change="typeChanged"
|
|
|
placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in options"
|
|
@@ -53,81 +54,83 @@
|
|
|
<el-row class="my-row">
|
|
|
<upload-component :display="display" :title="'沟通扫描件'" :accept="'*'" :file-obj-list="fileList" @uploadSuccess="uploadSuccess"/>
|
|
|
</el-row>
|
|
|
- <div class="title"><span style="color: red">*</span> 订单产品明细</div>
|
|
|
- <el-row>
|
|
|
- <el-table
|
|
|
- :data="cusRCommProductVOS"
|
|
|
- border
|
|
|
- style="width: 100%;">
|
|
|
- <el-table-column
|
|
|
- label="序号"
|
|
|
- type="index"
|
|
|
- width="50"
|
|
|
- align="center">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="productName"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="产品名称">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="cnt"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="数量"
|
|
|
- width="170">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input-number v-model="scope.row.cnt" :disabled="display" :min="1" style="width: 140px;"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="price"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="含税单价">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input-number v-model="scope.row.price" :disabled="display" :precision="2" :step="0.1" :min="0" style="width: 140px;"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="amount"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="含税总价">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ (scope.row.cnt*scope.row.price).toFixed(2) }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="rate"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="税率">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input type="number" v-model="scope.row.rate" :disabled="display">
|
|
|
- <template slot="append">%</template>
|
|
|
- </el-input>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="notes"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="备注">
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-row>
|
|
|
- <el-row v-if="!display" style="text-align: center; margin-top: 10px;">
|
|
|
- <el-button type="primary" icon="el-icon-plus" @click="inBound"></el-button>
|
|
|
- </el-row>
|
|
|
+ <div v-show="detailVisible">
|
|
|
+ <div class="title"><span style="color: red">*</span> 订单产品明细</div>
|
|
|
+ <el-row>
|
|
|
+ <el-table
|
|
|
+ :data="cusRCommProductVOS"
|
|
|
+ border
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-table-column
|
|
|
+ label="序号"
|
|
|
+ type="index"
|
|
|
+ width="50"
|
|
|
+ align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="productName"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="产品名称">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="cnt"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="数量"
|
|
|
+ width="170">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number v-model="scope.row.cnt" :disabled="display" :min="1" style="width: 140px;"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="price"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="含税单价">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number v-model="scope.row.price" :disabled="display" :precision="1" :step="0.1" :min="0" style="width: 140px;"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="amount"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="含税总价">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ (scope.row.cnt*scope.row.price).toFixed(1) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="rate"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="税率">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input type="number" v-model="scope.row.rate" :disabled="display">
|
|
|
+ <template slot="append">%</template>
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="notes"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="备注">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-row>
|
|
|
+ <el-row v-if="!display" style="text-align: center; margin-top: 10px;">
|
|
|
+ <el-button type="primary" icon="el-icon-plus" @click="inBound"></el-button>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="visible = false">取消</el-button>
|
|
|
<el-button v-if="!display" type="primary" @click="dataFormSubmit()">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <template-chose v-if="inboundVisible" ref="inbound" @addItem="addItem" />
|
|
|
+ <template-chose v-if="inboundVisible" ref="inbound" @addItems="addItems" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -147,6 +150,7 @@
|
|
|
data () {
|
|
|
return {
|
|
|
inboundVisible: false,
|
|
|
+ detailVisible: false,
|
|
|
visible: false,
|
|
|
display: false,
|
|
|
dictType: 'material_type',
|
|
@@ -192,9 +196,13 @@
|
|
|
}
|
|
|
})
|
|
|
if (!id) return
|
|
|
+ this.detailVisible = true
|
|
|
await getCoDetail(this.id).then(({data}) => {
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataForm = data.data
|
|
|
+ if (this.dataForm.coType !== '1') {
|
|
|
+ this.detailVisible = false
|
|
|
+ }
|
|
|
// 附件显示
|
|
|
this.fileList = []
|
|
|
data.data.attachList.forEach((item) => {
|
|
@@ -235,7 +243,13 @@
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- this.dataForm.cusRCommProductVOS = this.cusRCommProductVOS
|
|
|
+ if (this.dataForm.coType === '1') {
|
|
|
+ if (this.cusRCommProductVOS.length === 0) {
|
|
|
+ this.$message.warning('请选择订单产品明细')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.dataForm.cusRCommProductVOS = this.cusRCommProductVOS
|
|
|
+ }
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl(`/biz-service/cusCommunication/save`),
|
|
|
method: 'post',
|
|
@@ -277,8 +291,17 @@
|
|
|
notes: item.notes
|
|
|
})
|
|
|
},
|
|
|
+ addItems (items) {
|
|
|
+ this.cusRCommProductVOS = []
|
|
|
+ items.forEach((item) => {
|
|
|
+ this.addItem(item)
|
|
|
+ })
|
|
|
+ },
|
|
|
uploadSuccess (fileList) {
|
|
|
this.fileList = fileList
|
|
|
+ },
|
|
|
+ typeChanged (item) {
|
|
|
+ this.detailVisible = item === '1'
|
|
|
}
|
|
|
}
|
|
|
}
|