| | |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" /> |
| | | <span class="search_title">客户分类:</span> |
| | | <el-select v-model="searchForm.customerType" |
| | | placeholder="请选择" |
| | | style="width: 240px" |
| | | clearable |
| | | @change="handleQuery"> |
| | | <el-option label="零售客户" |
| | | value="零售客户" /> |
| | | <el-option label="进销商客户" |
| | | value="进销商客户" /> |
| | | </el-select> |
| | | <!-- <span class="search_title">客户分类:</span>--> |
| | | <!-- <el-select v-model="searchForm.customerType"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- style="width: 240px"--> |
| | | <!-- clearable--> |
| | | <!-- @change="handleQuery">--> |
| | | <!-- <el-option label="零售客户"--> |
| | | <!-- value="零售客户" />--> |
| | | <!-- <el-option label="进销商客户"--> |
| | | <!-- value="进销商客户" />--> |
| | | <!-- </el-select>--> |
| | | <el-button type="primary" |
| | | @click="handleQuery" |
| | | style="margin-left: 10px">搜索</el-button> |
| | |
| | | label: "联系电话", |
| | | prop: "contactPhone", |
| | | }, |
| | | |
| | | |
| | | { |
| | | dataType: "action", |
| | | label: "操作", |
| | |
| | | const unauthorizedData = selectedRows.value.filter( |
| | | item => item.maintainer !== userStore.nickName |
| | | ); |
| | | if (unauthorizedData.length > 0) { |
| | | proxy.$modal.msgWarning("不可删除他人维护的数据"); |
| | | return; |
| | | } |
| | | // if (unauthorizedData.length > 0) { |
| | | // proxy.$modal.msgWarning("不可删除他人维护的数据"); |
| | | // return; |
| | | // } |
| | | ids = selectedRows.value.map(item => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("请选择数据"); |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="维护人:" prop="maintainUserId"> |
| | | <el-select |
| | | v-model="form.maintainUserId" |
| | | placeholder="请选择" |
| | | clearable |
| | | disabled |
| | | > |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.nickName" |
| | | :label="item.nickName" |
| | | :value="item.userId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="12"> |
| | | <el-form-item |
| | | label="纳税人识别号:" |
| | | prop="taxpayerIdentificationNum" |
| | |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <!-- <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="公司地址:" prop="companyAddress"> |
| | | <el-input |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | </el-row> --> |
| | | <!-- <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="开户行:" prop="bankAccountName"> |
| | | <el-input |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-row> --> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人:" prop="contactUserName"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="维护人:" prop="maintainUserId"> |
| | | <el-select |
| | | v-model="form.maintainUserId" |
| | | placeholder="请选择" |
| | | clearable |
| | | disabled |
| | | > |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.nickName" |
| | | :label="item.nickName" |
| | | :value="item.userId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <!-- <el-row :gutter="30"> --> |
| | | |
| | | <!-- <el-col :span="12"> |
| | | <el-form-item label="维护时间:" prop="maintainTime"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | </el-col> --> |
| | | <!-- </el-row> --> |
| | | <!-- <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="供应商类型:" prop="supplierType"> |
| | | <el-select v-model="form.supplierType" placeholder="请选择" clearable> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-row> --> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | prop: "supplierName", |
| | | width: 250, |
| | | }, |
| | | { |
| | | label: "供应商类型", |
| | | prop: "supplierType", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "纳税人识别号", |
| | | prop: "taxpayerIdentificationNum", |
| | | width: 230, |
| | | }, |
| | | { |
| | | label: "公司地址", |
| | | prop: "companyAddress", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "联系方式", |
| | | prop: "companyPhone", |
| | | width:150 |
| | | }, |
| | | { |
| | | label: "开户行", |
| | | prop: "bankAccountName", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "账号", |
| | | prop: "bankAccountNum", |
| | | width: 220, |
| | | }, |
| | | // { |
| | | // label: "供应商类型", |
| | | // prop: "supplierType", |
| | | // width: 120, |
| | | // }, |
| | | // { |
| | | // label: "纳税人识别号", |
| | | // prop: "taxpayerIdentificationNum", |
| | | // width: 230, |
| | | // }, |
| | | // { |
| | | // label: "公司地址", |
| | | // prop: "companyAddress", |
| | | // width: 220, |
| | | // }, |
| | | // { |
| | | // label: "联系方式", |
| | | // prop: "companyPhone", |
| | | // width:150 |
| | | // }, |
| | | // { |
| | | // label: "开户行", |
| | | // prop: "bankAccountName", |
| | | // width: 220, |
| | | // }, |
| | | // { |
| | | // label: "账号", |
| | | // prop: "bankAccountNum", |
| | | // width: 220, |
| | | // }, |
| | | { |
| | | label: "联系人", |
| | | prop: "contactUserName", |
| | |
| | | prop: "contactUserPhone", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "维护人", |
| | | prop: "maintainUserName", |
| | | }, |
| | | // { |
| | | // label: "维护人", |
| | | // prop: "maintainUserName", |
| | | // }, |
| | | |
| | | { |
| | | label: "维护时间", |
| | | prop: "maintainTime", |
| | | width:100 |
| | | }, |
| | | // { |
| | | // label: "维护时间", |
| | | // prop: "maintainTime", |
| | | // width:100 |
| | | // }, |
| | | { |
| | | dataType: "action", |
| | | label: "操作", |
| | |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="出库数量" |
| | | label="发货数量" |
| | | prop="stockOutNum" |
| | | show-overflow-tooltip |
| | | /> |
| | |
| | | </el-form-item> |
| | | </el-col> --> |
| | | <el-col :span="12"> |
| | | <el-form-item label="待发货数量:"> |
| | | <el-form-item label="待发货数量:" prop="remainAmount"> |
| | | <el-input v-model="deliveryForm.remainAmount" disabled placeholder="请输入待发货数量"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | deliveryRules: { |
| | | type: [ |
| | | { required: true, message: "请选择发货类型", trigger: "change" } |
| | | ], |
| | | remainAmount: [ |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | const remain = Number(value) || 0; |
| | | if (remain <= 0) { |
| | | return callback(new Error("待发货数量需要大于0")); |
| | | } |
| | | return callback(); |
| | | }, |
| | | trigger: "change", |
| | | } |
| | | ], |
| | | deliveryMode: [ |
| | | { required: true, message: "请选择发货模式", trigger: "change" } |
| | |
| | | * @param row 行数据 |
| | | */ |
| | | const getShippingStatusText = (row) => { |
| | | // 如果已发货(有发货日期或车牌号),显示"已发货" |
| | | if (row.shippingDate || row.shippingCarNumber) { |
| | | return '已发货'; |
| | | } |
| | | |
| | | // 获取发货状态字段 |
| | | const status = row.shippingStatus; |
| | | |
| | | // 如果状态为空或未定义,默认为"待发货" |
| | | if (status === null || status === undefined || status === '') { |
| | | const total = Number(row?.quantity || 0); |
| | | const shipped = Number(row?.partSendAmount || 0); |
| | | if (shipped <= 0) { |
| | | return '待发货'; |
| | | } |
| | | |
| | | // 状态是字符串 |
| | | const statusStr = String(status).trim(); |
| | | const statusTextMap = { |
| | | '待发货': '待发货', |
| | | '待审核': '待审核', |
| | | '审核中': '审核中', |
| | | '审核拒绝': '审核拒绝', |
| | | '审核通过': '审核通过', |
| | | '已发货': '已发货' |
| | | }; |
| | | return statusTextMap[statusStr] || '待发货'; |
| | | if (shipped < total) { |
| | | return '发货中'; |
| | | } |
| | | if (shipped >= total && total > 0) { |
| | | return '已发货'; |
| | | } |
| | | return '待发货'; |
| | | }; |
| | | |
| | | /** |
| | |
| | | * @param row 行数据 |
| | | */ |
| | | const getShippingStatusType = (row) => { |
| | | // 如果已发货(有发货日期或车牌号),显示绿色 |
| | | if (row.shippingDate || row.shippingCarNumber) { |
| | | return 'success'; |
| | | } |
| | | |
| | | // 获取发货状态字段 |
| | | const status = row.shippingStatus; |
| | | |
| | | // 如果状态为空或未定义,默认为灰色(待发货) |
| | | if (status === null || status === undefined || status === '') { |
| | | const total = Number(row?.quantity || 0); |
| | | const shipped = Number(row?.partSendAmount || 0); |
| | | if (shipped <= 0) { |
| | | return 'info'; |
| | | } |
| | | |
| | | // 状态是字符串 |
| | | const statusStr = String(status).trim(); |
| | | const typeTextMap = { |
| | | '待发货': 'info', |
| | | '待审核': 'info', |
| | | '审核中': 'warning', |
| | | '审核拒绝': 'danger', |
| | | '审核通过': 'success', |
| | | '已发货': 'success' |
| | | }; |
| | | return typeTextMap[statusStr] || 'info'; |
| | | if (shipped < total) { |
| | | return 'warning'; |
| | | } |
| | | if (shipped >= total && total > 0) { |
| | | return 'success'; |
| | | } |
| | | return 'info'; |
| | | }; |
| | | |
| | | const getRemainAmount = (row) => { |