1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <template>
- <div>
- <el-button size="mini" block @click="onshow">更改成交状态</el-button>
- <el-dialog title="" :visible.sync="dialogForm" width="400px" append-to-body>
- <div slot="title" style="font-size: 15px">
- 更改成交状态
- </div>
- <div>
- <el-row :gutter="20">
- <el-form :model="form" :rules="rules" ref="form" size="mini" label-position="top" label-width="90px">
- <el-col :span="24">
- <el-form-item prop="tradingstatus" label="成交状态:" >
- <el-select v-model="form.tradingstatus" placeholder="请选择成交状态" style="width: 100%">
- <el-option
- v-for="item in status"
- :key="item.value"
- :label="item.value"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-form>
- </el-row>
- </div>
- <div class="dialog-footer">
- <el-button size="small" @click="dialogForm = false" class="normal-btn-width">取 消</el-button>
- <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- export default {
- name: "transactionStatus",
- props:["id"],
- data(){
- return {
- dialogForm:false,
- form:{
- tradingstatus:""
- },
- rules:{
- tradingstatus: [
- { required: true, message: '未选择成交状态', trigger: 'change' },
- ],
- },
- status:[
- {
- label:'未成交',
- value:'未成交'
- },
- {
- label:'已成交',
- value:'已成交'
- },
- {
- label:'多次成交',
- value:'多次成交'
- }
- ]
- }
- },
- methods:{
- onshow(){
- this.dialogForm = true
- this.$emit("onshow")
- },
- onSubmit(){
- this.$refs['form'].validate(async (valid) => {
- if (!valid) return false
- const res = await this.$api.requested({
- "id": 20221012164102,
- "content": {
- "sa_customersids": [this.id],
- "tradingstatus": this.form.tradingstatus//(未成交、已成交、多次成交)
- },
- })
- this.tool.showMessage(res, ()=>{
- this.dialogForm = false
- this.$emit("shareSuccess")
- })
- })
- }
- }
- }
- </script>
- <style scoped>
- </style>
|