| | |
| | | <el-button type="success" @click="syncOrder" |
| | | :icon="isSync ? 'el-icon-loading' : 'el-icon-refresh'">同步</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" @click="openAddDia">新增</el-button> |
| | | <!-- <el-button icon="el-icon-edit-outline">修改</el-button> --> |
| | | <el-button icon="el-icon-delete" @click="delSales">删除</el-button> |
| | | <el-button icon="el-icon-download">导出</el-button> |
| | | </el-col> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="order_number" label="订单编号" width="150"> |
| | | </el-table-column> |
| | | <el-table-column label="订单类型" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag effect="dark" size="mini" style="font-size: 8px;">{{ scope.row.order_type }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="合同编号" width="220"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="工程名称"> |
| | | <el-table-column prop="name" label="工程名称" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="proname" label="客户名称"> |
| | | <el-table-column prop="proname" label="客户名称" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="交货日期" label="交货日期" width="150"> |
| | | </el-table-column> |
| | | <el-table-column prop="note" label="备注" width="150"> |
| | | <el-table-column prop="note" label="备注" width="150" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="状态" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.type == 1">通过</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.type == 0">不通过</span> |
| | | <span v-else>未审核</span> |
| | | <span v-else>{{ null }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="220"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="changeShowDetail(scope.row)"> 查看详情 </span> |
| | | <span class="table_do" v-if="scope.row.type == null" @click="saleCheck(scope)"> 审核 </span> |
| | | <span class="table_do" @click="downloadFile(scope.row)"> 下载附件 </span> |
| | | <span class="table_do" v-if="scope.row.type == 2" @click="saleCheck(scope)"> 审核 </span> |
| | | <span class="table_do" v-else> </span> |
| | | <span class="table_do" v-if="scope.row.type == null" |
| | | <span class="table_do" v-if="scope.row.type == 2" |
| | | @click="openUpDia(scope.row.id)"> 编辑 </span> |
| | | <span class="table_do" v-else> </span> |
| | | <span class="table_do" @click="delSale(scope.$index)"> 删除 </span> |
| | |
| | | </el-dialog> |
| | | </div> |
| | | <div class="select-model"> |
| | | <el-dialog :title="`销售${upDia == true ? '修改' : '新增'}`" :visible.sync="addDia" width="850px" |
| | | <el-dialog :title="`销售${upDia == true ? '修改' : '新增'}`" :visible.sync="addDia" width="900px" |
| | | @close="closeDialog"> |
| | | <div class="body"> |
| | | <div class="head">基本信息</div> |
| | |
| | | <el-col :span="3">工程名称</el-col> |
| | | <el-col :span="8"> |
| | | <el-input v-model="addData.name" size="small" placeholder="请输入工程名称" clearable></el-input> |
| | | </el-col> |
| | | <el-col :span="3" :offset="2">备注</el-col> |
| | | <el-col :span="8"> |
| | | <el-input v-model="addData.note" size="small" placeholder="请输入备注" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | placeholder="请输入规格型号"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="单位"> |
| | | <el-table-column prop="unit" label="单位" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.unit" size="small" clearable placeholder="请输入"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="number" label="数量"> |
| | | <el-table-column prop="number" label="数量" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model.number="scope.row.number" size="small" |
| | | @change="(val) => scope.row.number = isNaN(val) ? null : val" clearable |
| | | placeholder="请输入"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="price" label="单价"> |
| | | <el-table-column prop="price" label="单价" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.price" size="small" clearable placeholder="请输入"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="username" label="联系人"> |
| | | <el-table-column prop="username" label="联系人" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.username" size="small" clearable |
| | | placeholder="请输入"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="phone" label="电话"> |
| | | <el-table-column prop="phone" label="电话" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.phone" size="small" clearable placeholder="请输入"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="地址"> |
| | | <el-table-column prop="address" label="地址" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.address" size="small" clearable |
| | | placeholder="请输入"></el-input> |
| | |
| | | orderNumber: null, |
| | | code: null, |
| | | name: null, |
| | | note: null, |
| | | proname: null, |
| | | adress: null, |
| | | username: null, |
| | |
| | | this.selectRawInspectsList() |
| | | }, |
| | | methods: { |
| | | downloadFile(row) { |
| | | let baseIp = "http://192.168.18.16:9999" |
| | | this.axios.post(this.$api.url.saleDownload, { |
| | | id: row.id |
| | | }).then(res => { |
| | | // console.log(res.data); |
| | | // 循环遍历每个文件并创建下载链接 |
| | | for (let index = 0; index < 2; index++) { |
| | | const element = res.data[0]; |
| | | // 创建一个链接元素 |
| | | var a = document.createElement('a'); |
| | | |
| | | // 设置链接元素的href属性为文件的URL |
| | | a.href = baseIp+element; |
| | | |
| | | // // 设置链接元素的download属性为文件名 |
| | | a.download = row.name+"附件"+(index+1); |
| | | |
| | | // 模拟点击链接以触发下载 |
| | | a.click(); |
| | | |
| | | // |
| | | a.remove() |
| | | } |
| | | }) |
| | | }, |
| | | closeDialog() { |
| | | this.addData = { |
| | | orderNumber: null, |
| | | code: null, |
| | | name: null, |
| | | note: null, |
| | | proname: null, |
| | | adress: null, |
| | | username: null, |
| | |
| | | message: '同步假成功(◕ᴗ◕)!', |
| | | type: 'success' |
| | | }); |
| | | this.isSync=false |
| | | this.isSync = false |
| | | }, 2000); |
| | | return |
| | | //调用同步接口 |
| | |
| | | } else { |
| | | for (var c in this.addData.saleMaterialList[b]) { |
| | | if (this.addData.saleMaterialList[b][c] == null || this.addData.saleMaterialList[b][c] == '' || Object |
| | | .keys(this.addData.saleMaterialList[b]).length != 6) { |
| | | .keys(this.addData.saleMaterialList[b]).length != 9) { |
| | | this.$message.error('产品信息有必填项未填写') |
| | | return |
| | | } |